File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JOptionPane focus 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 focus" Watch "JOptionPane focus" New topic

JOptionPane focus

Shraga van Shufel
Ranch Hand

Joined: Apr 20, 2003
Posts: 33
I am writing a small application where the user can choose between System console or GUI for the user interface.
Everything is running fine, however when the user choose for a GUI the JOptionPane does open but not in the foreground.
The only way to get it to the foreground is using ALT + TAB
I look at the JOptionPane docs but I couldn't find a way to focus it.
any ideas ?
thanks in advance
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

How are you creating and launching your JOptionPane? JOptionPanes are usually launched from an existing JFrame... I'm not sure what they would do if you wanted to use them like a top-level frame.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: JOptionPane focus
jQuery in Action, 3rd edition