This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes how to enforce the user to close the frame before proceed to another frame? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to enforce the user to close the frame before proceed to another frame?" Watch "how to enforce the user to close the frame before proceed to another frame?" New topic
Author

how to enforce the user to close the frame before proceed to another frame?

kahkean chor
Ranch Hand

Joined: Jan 26, 2013
Posts: 56
something like this........thanks in advance


[Thumbnail for Untitled.jpg]

Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2155
    
    7
In general an application should only use a single main JFrame. For other popup windows you should use a JDialog. In this case you would want to use a model JDialog which will force the user to close the dialog before continuing.
kahkean chor
Ranch Hand

Joined: Jan 26, 2013
Posts: 56
sry..i dun get it....can write down some sample code?
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2155
    
    7
You create JDialogs the same way you create a JFrame.

Or in your case you may be able to use a JOptionPane which creates the JDialog for you.

Start by reading the Swing tutorial on: How to Make Dialogs
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to enforce the user to close the frame before proceed to another frame?
 
Similar Threads
mouse clicks
Page Reload / Frame
Frames, frames, frames....
TIME FRAME FOR SCJD???
Background Image not showing