JDesktop, JMenu, JInternalFrame
843807Feb 26 2003 — edited Feb 27 2003Hi, I'm totaly new to Java and application development, and I need a bit of help, or pointing the right direction,
I have created an application that uses jdesktop to show internalframes when a user clicks on the menu.
What I am trying to do is, say when internalframe_one is open the user cannot open another internalframe_one frame from the menubar, I have tried the following
void jMenuItem2_actionPerformed(ActionEvent e) {
internalframe_one dlg = new internalframe_one();
desktop.add(dlg);
dlg.pack();
dlg.show();
jMenuItem1.setEnabled(false);
}
which is fine but when internalframe_one is closed i cant get the jMenuItem1.setEnabled(false); re-set to jMenuItem1.setEnabled(true);
I have tried various ways that i can think of, but i seem to be getting lost or chasing my tail in circles.
Unless i am being totally dumb and there is a proper way to do it that I cannot find in the help documentation or forums etc.
Appriciate some help,
Thanks