Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void setClearOnFocus(TextField textField) {
- textField.focusedProperty().addListener((obs, wasFocused, isNowFocused) -> {
- if(isNowFocused)
- textField.clear();
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement