Meaningless Drivel is fun!
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 Customer Requirements for Developers this week in the Jobs Discussion 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: 3908
    
  18

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.


The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to restrict the focus between parent and child JFrame??
 
It's not a secret anymore!