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

JOptionPane  RSS feed

 
Ambrose Tati
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
Is it possible to use one of the JOptionPane.showInputDialog()
methods and have it to display a JPasswordField instead of a JTextField?
Thanks in advance
Ambrose
 
Michael Hildner
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For what it's worth, I looked through the API and it doesn't look possible. The showXXXDialog() methods are static, and you don't get a handle to the actual Dialog object.
My guess is you are forced to create your own. Luckily, an input dialog box is relatively simple. Happy coding
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!