JavaFX ComboBox not responding on Windows 10

后端 未结 5 2037
不思量自难忘°
不思量自难忘° 2020-12-23 14:38

I recently upgraded to Windows 10 and JavaFX code which worked in Windows 8.1 appears to freeze up in 10. I\'ve tracked the issue down to opening a ComboBox within a dialog.

5条回答
  •  梦毁少年i
    2020-12-23 15:08

    As mentioned in other answers, this is likely an error to do with Intel graphics processors and it appears not to be solved by a driver update.

    However, while this bug is hopefully being fixed, for now I recommend adding an event which focuses the combobox upon a mouse press and therefore solves the problem. Simply add the code below:

    comboBox.setOnMousePressed(new EventHandler(){
        @Override
        public void handle(MouseEvent event) {
            comboBox.requestFocus();
        }
    });
    

提交回复
热议问题