aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes how to disable parent jframe when child jframe is active Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to disable parent jframe when child jframe is active" Watch "how to disable parent jframe when child jframe is active" New topic
Author

how to disable parent jframe when child jframe is active

sunil ingalagi
Greenhorn

Joined: Apr 23, 2008
Posts: 17
Hi...
Please anyone tell me as how to disable parent frame or window when
child frame is active.


when i click on a jbutton on one frame, a new frame will open. while this new frame is open i want to disable the first frame. like disabling any mouse click on first window. and when i close new frame then i have to enable first frame. and both the frames have main method in them.

and if i have to do this in net beans then how to do it?

thanks in advance for any help....
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2227
    
    8
Don't use a "child frame". Instead use a "modal JDialog".
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

Check out the API for JOptionPane class. It has numerous showXXXDialog methods which will help you setup a modal dialog easily.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
sunil ingalagi
Greenhorn

Joined: Apr 23, 2008
Posts: 17
Rob Camick wrote:Don't use a " child frame". Instead use a "modal JDialog".


Thank you very much Rob
sunil ingalagi
Greenhorn

Joined: Apr 23, 2008
Posts: 17
Maneesh Godbole wrote:Check out the API for JOptionPane class. It has numerous showXXXDialog methods which will help you setup a modal dialog easily.


Thanks maneesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to disable parent jframe when child jframe is active