I want the user to put his password into a Inputdialog. But I want that the text in the textfield are e.g. stars (***), so no one can read which password is written.
I use this Code for the Inputdialog (the password will be saved in the pw variable):
String pw = JOptionPane.showInputDialog("Password:");