简体   繁体   中英

Problem with Painting in Java Swing App in Java 1.6

I'm working on a Swing application (currently running on Java 1.6 update 11) which has some intermittent paint refresh problems (eg 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?

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.

是否所有绘画和模型更改操作都在EDT上执行(例如,更改TableModel等)?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM