This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes To disable the frame ......................... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "To disable the frame ........................." Watch "To disable the frame ........................." New topic
Author

To disable the frame .........................

krishna yendrapalli
Greenhorn

Joined: Feb 15, 2006
Posts: 1
i'm facing a problem with the custom dialogbox. There is an inbuilt method in JOptionPane, but this is a custom Dialog.

I have a frame with menu and it has a menuitem. when i click the menuitem , it opens a custom dialogbox with 2 panels. After the dialog is opened, i'm still able to access the Frame. I don't want to access the frame.
I tried setEnabled(false) but still it is not working .

Can anyone help me out. Plz give me an example to disable access to the frame after the action of menuitem.

Thanks in Advance,
krishna
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
if it's a custom dialog, you should be able to use
setModal(true);
 
wood burning stoves
 
subject: To disable the frame .........................