Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pop up windows

 
L Durrell
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to create pop-up windows for search windows and warning messages? If so (and certainly it is), how does one do it?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the JOptionPane class. It has a number of convenient methods for creating simple dialogs. Also you may find it useful to have some sort of GUI utility class which has additional methods for any operations you find yourself doing more than once. E.g. I have a method
showError(String message, Throwable t)
which creates a pop-up for many error messages, which has a "see details" button which allows the user to look at the stack trace of an error, if they want. (While hiding it from the majority of users who would not want to see it.) This was too complex to set up with a single JOptionPane call, but it's useful to have a simple method call to do it, so I spent a little more time making the custom method. You may find similar situations.
 
L Durrell
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I'll check it out!
 
L Durrell
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More fun with pop-up windows!
I'm trying to create a custom search form with seven labels, five text fields, five radio buttons, and three regular buttons. I want to put it in a JDialog, but I'm wondering if it's even possible. I'm I barking up the wrong tree?
David
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic