This refers to the Labeled.mnemonicParsing property. It registers a key combination for activating an element (using the letter following _ in text + Alt (Windows, I donβt know if it is the same key on another OS)). For instance.
Button btn = new Button(); btn.setText("_Say 'Hello World'"); btn.setMnemonicParsing(true); btn.setOnAction(new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { System.out.println("Hello World!"); } });
Will also print Hello World! if the user presses Alt + S.
This does not happen if mnemnonicParsing is false . In this case, _ will also be printed "normal", and not underline the next letter.
source share