JavaFX ComboBox not responding on Windows 10

走远了吗. 提交于 2019-11-29 20:41:43

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.

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();
    }
});

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).

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!