| Author |
Swing re-paint issue
|
Mike Southgate
Ranch Hand
Joined: Jul 18, 2003
Posts: 183
|
|
I have a Jtree which allows me to select different nodes. Based on the level of the selected node, I display a different panel on the right of the tree. This works except for one thing. When I switch back and forth it stops painting the panel correctly. It doesn't show up until you move the mouse over some of the components when they suddenly appear. Here's what I'm doing: In short, I remove the panel from the parent, add the new one, and then validate. Any suggestions? ms
|
ms<br />SCJP, SCJD
|
 |
Mike Southgate
Ranch Hand
Joined: Jul 18, 2003
Posts: 183
|
|
Well, I seem to have solved this myself, though I'd like to understand why the solution is required... Adding a call to repaint() seems to solve the problem. But why is an explicit call to repaint required? What are the criteria which indicate a repaint is required? ms
|
 |
Craig Wood
Ranch Hand
Joined: Jan 14, 2004
Posts: 1535
|
|
|
How Swing Components Are Displayed
|
 |
 |
|
|
subject: Swing re-paint issue
|
|
|