• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Pop up windows

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. I'll check it out!
 
L Durrell
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic