aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JOptionPane question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane question" Watch "JOptionPane question" New topic
Author

JOptionPane question

Barry Brashear
Ranch Hand

Joined: Jun 05, 2001
Posts: 303
I want a dialog box to open with an informational message and remain
open for 3 seconds then close. Can I do this with JOptionPane? If not,
what should I use?

Thanks.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8907
    
    8

From the Java Tutorial: How To Make Dialogs

For most simple modal dialogs, you create and show the dialog using one of JOptionPane's showXxxDialog methods. . . If you need to control the dialog's window-closing behavior or if the dialog isn't modal, then you should directly instantiate JOptionPane and add it to a JDialog instance. Then invoke setVisible(true) on the JDialog to make it appear.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
You can use a JWindow with a timer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JOptionPane question