File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JOptionPane question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply 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: 8260

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: jrebel
 
subject: JOptionPane question
 
Similar Threads
JOptionPane
How to make the only the Child form enabled?
Weird actionPerformed method.
JOptionPane.showMessageDialog()
java alert