In this tutorial, I will show you how to use a PasswordField using JavaFX 15 or later with IntelliJ 2020.3 on Windows 10 x64.
The PasswordField is a text input control that does not display the actual characters entered. It displays an echo character for each character entered.
setText() method to set the actual text in a PasswordField.
getText() method to get the actual text in a PasswordField.
// Create a PasswordField
PasswordField pfPassword = new PasswordField();
// Get the password text
String passStr = pfPassword.getText();
VM options
--module-path "C:\Program Files\Java\javafx-sdk-15.0.1\lib"
--add-modules javafx.controls,javafx.fxml
#JavaFX #PasswordField #IntelliJ