1

I am working with an application that is experiencing painting issues on some users computers when the mouse passes over the tabs in a JTabbedPane. They also occasionally have similar issues on other interactive components like JButtons. I have only ever seen this error occur on mouse overs.

The application is being run with 1.6.0_20 and I have already tried the flag recommended in update 10 in case it was an issue with D3D (-Dsun.java2d.d3d=false).

Since I am a new user I cannot post a picture to illustrate this error. The best example I can think of is using Windows paint eraser on an image would create something similar to what I am seeing.

I appreciate any help you can provide.

mKorbel
  • 109,525
  • 20
  • 134
  • 319
shinds
  • 756
  • 7
  • 13

1 Answers1

1

Without an sscce that exhibits the problem you describe, it's hard to be specific, but this reminds me of the rendering artifact associated with setting the opaque property to true without completely rendering the area defined by a component's bounds. In particular, if you override paintComponent() and "do not honor the opaque property, you will likely see visual artifacts." Finally, the default opacity setting of some components varies by Look & Feel, so the effect may be platform dependent.

trashgod
  • 203,806
  • 29
  • 246
  • 1,045
  • Thanks for your reply. Unfortunately I cannot provide a code example. I cannot even reproduce it myself. I inherited the application and have run into many instances where paintAll was being called over and over but only once place where paint was overridden. I have tried to eliminate as many of these possible in case they are the culprits. The error for the users that do experience this seems to be on any component where the mouse over changes the graphics. IE, mousing over a tab in a tabbed pane or mousing over a button. – shinds Feb 29 '12 at 18:52