Kennwort mit JOptionPane abfragen
[code lang="java"]JPasswordField jPasswordField = new JPasswordField(); Object[] message = {"Kennwort:\n", jPasswordField}; int a = JOptionPane.showConfirmDialog(null, message, "Kennwort eingeben", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if(a == JOptionPane.OK_OPTION) { String pwd = new String(jPasswordField.getPassword()); System.out.println("Kennwort:…