Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
kahkean chor
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
something like this........thanks in advance
Untitled.jpg
[Thumbnail for Untitled.jpg]
 
Rob Camick
Ranch Hand
Posts: 2475
8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sry..i dun get it....can write down some sample code?
 
Rob Camick
Ranch Hand
Posts: 2475
8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic