4

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, Yoav

Community
  • 1
  • 1
Yoav Schwartz
  • 678
  • 1
  • 8
  • 18

1 Answers1

2

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.

Marv
  • 3,517
  • 2
  • 22
  • 47