JavaFX ComboBox not responding on Windows 10

后端 未结 5 2031
不思量自难忘°
不思量自难忘° 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条回答
  • 2020-12-23 15:01

    My late two cents, but I do confirm that

    System.setProperty("glass.accessible.force", "false");
    

    (As posted by @PingZing)

    Did fix the same problem on my app. The touch ability was simply given by....

    Pen 'n touch Wacom bamboo create tablet
    

    That is giving Windows 10 touch capabilities

    0 讨论(0)
  • 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<MouseEvent>(){
        @Override
        public void handle(MouseEvent event) {
            comboBox.requestFocus();
        }
    });
    
    0 讨论(0)
  • 2020-12-23 15:15

    Upgrading to JDK 8u72 or newer should fix the issue.

    This was a known issue in JDK 8u40 affecting certain Windows 10 touchscreen computers. Clicking an out of focus ComboBox would cause programs to become unresponsive. The issue was resolved on September 17, 2015, meaning it shouldn't happen on any version after JDK 8u72.

    If upgrading your JDK isn't an option, there are two known workarounds.

    1. Run your app with accessibility disabled by adding System.setProperty("glass.accessible.force", "false");
    2. Run the Windows Narrator screen reader (with accessibility left enabled).
    0 讨论(0)
  • 2020-12-23 15:16

    According to the bug report, a temporary workaround is setting the following system property:

    java -Dglass.accessible.force=false ... 
    

    or, in an application's code:

    System.setProperty("glass.accessible.force", "false");
    

    Or, alternately, "Run the Windows Narrator screen reader (with accessibility left enabled)".

    The bug appears to have been introduced in JDK 8u40, and affects Windows 10 systems with a touchscreen installed and enabled.

    Some quick testing seems to indicate that it solved the problem for me.

    0 讨论(0)
  • 2020-12-23 15:16

    I am having the same problem with an Intel HD 4000.

    I may have a solution though. I just replaced every usage of ComboBox in my application with ChoiceBox. It isn't ideal, but for small applications like mine, it might be the best option until Oracle, or Intel, gets their act together.

    0 讨论(0)
提交回复
热议问题