• 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

How to creating an Alert Dialog window?

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to create a window to pop up that tells a user an error has occured that looks like the ones that normally pop up in Windows (centered on screen, with an icon, single or up to 3 buttons such as "OK", "Cancel", "Yes", "No").
Is there a class that does this? Matching a windows Alert Dialog Box exactly is not required, but would be preferred.
Thanks
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Javax Swing has an JOptionPane class that has a .showConfirmDialog method that has the Yes/No/Cancel options you mentioned.
[This message has been edited by Kathy Lynch (edited March 09, 2001).]
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you just have a look at the class JOptionPane in javax(java swing) classes, you will find the all kind of dialogs you need.
Just explore this class in JDK documentation.
HTH
cheers
Siva Prasad
reply
    Bookmark Topic Watch Topic
  • New Topic