Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDesktop, JMenu, JInternalFrame

843807Feb 26 2003 — edited Feb 27 2003
Hi, 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 27 2003
Added on Feb 26 2003
4 comments
220 views