my dog learned polymorphism
The moose likes Swing / AWT / SWT and the fly likes Panels do not get repainted Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Panels do not get repainted" Watch "Panels do not get repainted" New topic

Panels do not get repainted

Sam Codean
Ranch Hand

Joined: Feb 26, 2006
Posts: 194
I have a reusable class called as DuplicatorPanel. This class has two add/ remove buttons like in Mac if you are familiar.

The problem is that the screen gets updated with an extra row in case i have a main method in Duplicator itself. However if i have that in another panel as in HyperlinkBuilder then it does not repaint itself.

Please can someone help ?

This is another class that calls the above

-Sam Codean<br />SCJP 1.4 (98%)<br />SCJD 5.0 (87.5%)
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Add a call to revalidate in this method:
I agree. Here's the link:
subject: Panels do not get repainted
It's not a secret anymore!