This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Disappearing showInputDialog  RSS feed

 
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: 947
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!