• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JOptionPane focus

 
Shraga van Shufel
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
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
/Shraga.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic