Link to home
Start Free TrialLog in
Avatar of Omer-Pitou
Omer-Pitou

asked on

Java Window Frames

Dear Sirs,
I have 2 windows frames. Let's put it this way: a parent and a child.
How can I prevent access to the parent frame when the child is active (called from the parent). In other words, open it in read mode.

Another scenario, is that to only keep the child active and close the parent.

I am new to Java.
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Generally speaking, you should only have one JFrame class per app. Additional windows will be some kind of dialog. If you use a JOptionPane for this, it is by definition modal and the functionality will be as you desire. If you want to use a JDialog subclass, call setModal(true)
Avatar of Omer-Pitou
Omer-Pitou

ASKER

Thanks. Can I put button, textfield... On a JDIalog?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks very much for your time
:)