When FlatLaf is used, then in dialogs wrong button is activated using keyboard navigation.
Steps to reproduce:
- Open NetBeans and select FlatLaf look & feel
- Open any file
- Make any change in file
- Exit NetBeans - clicking Close button or File > Exit
- Dialog Save will show up
- Press Tab key - Save button will be highlighted
- Press Enter
Cancel button is activated - file is not saved and NetBeans are not closed
Save button is activated - file is saved and NetBeans are closed.
Same problem is also with other dialogs.
When GTK+ LaF is used, then correct dialog button is activated.
Tested in NetBeans 12.2 and 12.3 beta 1.