Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / March 2005

Tip: Looking for answers? Try searching our database.

Dialog containing JPanel from a JFrame - focus issues

Thread view: 
arun.hallan@gmail.com - 09 Mar 2005 19:23 GMT
My main view is a JFrame.
I have a wizard dialog which extends a JPanel.

Currently when I call the JPanel, I am having focus issues - when i
click off the wizard i lose the panel.

What i want to happen is the main view not being able to be selected
while the wizard is open, much like a JOptionPane works.

I've tried to create a JDialog from the wizard, with the parent being
the main view but to no avail.

Does anyone know how i could solve this?
JediJ - 10 Mar 2005 14:33 GMT
You need to display the JPanel Modally.  I dont believe there is a
quick method you can call to do this.  If I were doing this, I would
try to put a FocusListener on the JPanel and whenever you receive a
focusLost event you could call requestFocus() to regain focus.

Alternatively, you could try this approach from Sun:
http://java.sun.com/developer/JDCTechTips/2001/tt1220.html


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.