Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to stop flicker using HTML in JLabel JRadioButton, etc.

843807Apr 27 2010 — edited Apr 27 2010
I am using HTML in JLabels and JRadioButtons for multi-line labels and when my screens initially paint, the components flicker because they paint twice. It seems the labels paint one line first, then it is almost as if they realize they're using HTML and repaint again. It doesn't happen when the labels are a single line or if they are not HTML. Forcing the vertical alignment to the TOP or BOTTOM didn't seem to improve it.

Does anyone have a work-around to prevent the flickering... other than changing everything to using JEditorPane ... or is there a better component I don't know about????
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 25 2010
Added on Apr 27 2010
7 comments
387 views