This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Frame as MODAL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Frame as MODAL" Watch "Frame as MODAL" New topic

Frame as MODAL

Rajesh Kumar

Joined: Nov 16, 2001
Posts: 28
Hai Friends
I am new to Java
I have a doubt.
I have 2 Frames like..Frame1 and Frame2
In Frame1 a Button called "OK"
When i click that button (OK) from Frame1 ....the second Frame should open as a MODAL Frame.
Is it possible to Call another Frame class as MODAL ?
If anybody knows about this...please help me.
What shall i do in Frame1 and Frame 2 to make Frame2 as MODAL Frame.
Thanks in advance
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Rajesh,
You can not make Frames modal. The only class that can be modal is a Dialog. Look at the constructor of JDialog or Dialog to see where to specify if it is modal or not upon setvisible.
It is sorta covered in the JavaRanch Style Guide.
subject: Frame as MODAL
jQuery in Action, 3rd edition