A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
how to restrict the focus between parent and child JFrame??
Joined: Feb 24, 2011
Jun 15, 2011 03:09:04
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
Joined: Sep 20, 2010
Jun 15, 2011 03:29:40
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:
subject: how to restrict the focus between parent and child JFrame??
HFSJ Final Mock Question 47
Making a child window modal
How to close JOptionPane Dialog box & come parent frame??
Focus to Popup window
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014