Problem with Painting in Java Swing App in Java 1.6

喜你入骨 提交于 2019-12-01 03:57:05

问题


I'm working on a Swing application (currently running on Java 1.6 update 11) which has some intermittent paint refresh problems (e.g. there are artifacts etc.). This only happens to some users of our application but not others.

After doing some research, I found that setting the property sun.java2d.d3d to false may help and in fact, it helped for one of our users.

Now that some other users are complaining about the issue, I'm thinking of setting the property to false for all users.

My basic questions are the following:

What exactly is the cause of this? Is it the video card? Is it the driver? Is it a bug from Sun? (such as http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6635462) Combination of all three?

In other words, is is best to simply turn this property off or is it affecting only certain video cards in which an update to the latest driver would fix?


回答1:


Java introduced in R6 update 10 a pipeline that renders graphics based on Direct3D. According to the release description here it supports only NVidia and ATI cards, which means anyone not using those cards may have a problem. Since it is a recent innovation I would suggest that anyone using old drivers for those cards may also have problems. Upgrading a video driver will probably fix the first case but not the last.

If you set sun.java2d.d3d to false the worst that can happen is that some users will not achieve the performance that they theoretically could. You will have to balance whether this is preferable to the issues that you are seeing at the moment.




回答2:


Are all painting and model changing operations execute on EDT (e.g. changing TableModel etc.)?



来源:https://stackoverflow.com/questions/848481/problem-with-painting-in-java-swing-app-in-java-1-6

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