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!

Problem with swing sometimes not displaying components inside JFrame/JDialo

843807May 25 2010 — edited Jul 12 2010
Hello everyone,

I'm writing this because I encountered a problem and I can't seem to find an answer anywhere how to resolve it.
My problem is as follows:

I have application that is swing based. Sometimes the panel that contains tabbed pane with some controls is not being displayed (by that I mean controls and tabs are there but I can't see them). I can click on controls ( I don't see them but I can do it blindly or simply if i know where they are ) and they are working. If I take a JFrame that contains this tabbed pane and drag it to another windows screen ( meaning force it to refresh ) the controls become visible.Any attempt to force refresh like "shaking" frame very fast or moving it out of windows view screen and move it back again makes the controls visible. Problem can be recreated once per 10 application starts.
I'm using windows XP with sp3 but I tested this also on Windows 7 and the problem exist there too. Our application is using java 1.5 version.

I've tried calling repaint, revalidate, invalidate etc. this changes nothing. Also I made a logger to check if maybe status of components get changed somehow ( isVisible, isEnabled etc. ) and they are the same. So problem is not there.
Also I tried to only display one tab with one button and problem also can be hit.

One thing to add here is that application is using custom LayoutManagaer and Look and Fell. Can this be causing the problem or maybe something else ?
Do you have any suggestion how should I proceed with this ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 9 2010
Added on May 25 2010
19 comments
1,600 views