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