2

I've just started learning JavaFX, and tried out the setMneumonicParsing() method. However, I have a Mac, and it's not working. I understand that on Windows you press Alt and the letter after the _. I've tried pressing Alt, Cmd, Ctrl, fn, Shift and many combinations of these but nothing seems to work. Anyone have any experience with this?

Here's an excerpt from the code:

@Override
    public void start(Stage stage) throws Exception
    {
        // Create a Button or any control item
        Button myButton = new Button();
        myButton.setMnemonicParsing(true);
        myButton.setText("_Count");
Developer Guy
  • 2,318
  • 6
  • 19
  • 37
s.sand
  • 117
  • 2
  • 10
  • Either mnemonic or pneumatic - pick your poison. Mneumonic is neither a word nor or a method in JavaFX Button ;) However MnemonicParsing is enabled by default. See https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/Button.html – Michael Peacock Mar 23 '18 at 20:04

1 Answers1

2

Yes, that is a know issue with Mac. Try to utilize accelerators. Also check here: Using JavaFX 2.2 Mnemonic (and accelerators)

benji2505
  • 106
  • 1
  • 5