• Post Reply Bookmark Topic Watch Topic
  • New Topic

Disappearing showInputDialog

 
Jerry Goldsmith
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,

I am attempting to get input from the user using JOptionPane.showInputDialog. The trouble I'm having is that the dialog always pops up below my existing application window (Pro/Engineer CAD
software).

Is anyone aware of a way to get the showInputDialog pane to display on
top of any other open windows? Thanks.

Jerry
 
Brian Cole
Author
Ranch Hand
Posts: 920
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This can happen sometimes due to threading issues.

You might want to try SwingUtilities.invokeLater().
 
Jerry Goldsmith
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Brian,

I will check that out. As of now I've been able to get the dialog to
show in front using JDialog instead of JOptionPane. The trouble is,
I lose all of the slick out of the box dialogs provided by the latter.

I'm now trying to create a dialog from scratch. I can't seem to get
a text field to show in the JDialog window. I'm using JTextField.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!