wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes how to restrict the focus between parent and child JFrame?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to restrict the focus between parent and child JFrame??" Watch "how to restrict the focus between parent and child JFrame??" New topic
Author

how to restrict the focus between parent and child JFrame??

kumard ashish
Greenhorn

Joined: Feb 24, 2011
Posts: 2
I have a parent JFrame it contain a JButton. functionality of that button is to open another JFrame.

I want to restrict the focus of JFrame, means after closing the second JFrame focus should come into first JFrame(parent).
And focus should not come to first JFrameif second JFrame is open.

it is something like when you click on eclipse for create new project that time a window appear but without closing that small window
you can not perform action in the eclipse main window.
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3599
    
  14

Hi Kumard,

It sounds like you want to use a modal window. Take a look at the JOptionPane class, it can create and display dialog windows for you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to restrict the focus between parent and child JFrame??
 
Similar Threads
How to close JOptionPane Dialog box & come parent frame??
Focus to Popup window
HFSJ Final Mock Question 47
JFrame
Making a child window modal