Dialog containing JPanel from a JFrame - focus issues

  • Follow


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?

0
Reply arun.hallan (10) 3/9/2005 7:23:15 PM

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

0
Reply JediJ 3/10/2005 2:33:17 PM


1 Replies
145 Views

(page loaded in 0.053 seconds)

Similiar Articles:











7/25/2012 12:00:16 PM


Reply: