开发者

Need help understanding the affect of two java gui-related system properties

开发者 https://www.devze.com 2022-12-23 13:56 出处:网络
I had a problem envolving a mixing of lightweight and heavyweight components in java. Weird swing heavyweight & lightweight mixing problem

I had a problem envolving a mixing of lightweight and heavyweight components in java.

Weird swing heavyweight & lightweight mixing problem

A solution that was suggested to me (outside stackoverflow) was to set the system properties sun.awt.noerasebackground and sun.java2d.noddraw to true.

I want to know what side affects this change might have on my swing based java application (that runs in WinXP and has many swing components).

What kind of problems might arise? Could there be a performance affect? Might some other thing stop working?

Thanks开发者_如何学Go, Yoav


AWT components fill their background everytime they repaint. If you set the sun.awt.noerasebackground property to true, what was currently displayed remains until new content is drawn in the graphic context. This generally improves performance and reduce flickering, and it does not cause painting artifacts if the AWT component is entirely painted over.

sun.java2d.noddraw deactivate direct draw. This helps when drivers cause problems but can reduce performance.

0

精彩评论

暂无评论...
验证码 换一张
取 消