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.
ms<br />SCJP, SCJD
Joined: Jul 18, 2003
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?