How to get items which are removed/added to show up in AWT?
John C. Hayward
John.C.Hayward at wheaton.edu
Wed Mar 3 07:20:04 PST 1999
Dear Kaffe People,
This may be off topic - I have a AWT application which has a panel
which I remove and add items to after it has been displayed. When I
remove things from the panel they disapear but the panel does not adjust
for the removed items (in this case a grid layout). When I add items
they do not appear.
I have tried calls to show, repaint, invalidate.
The closest thing which almost works seems to be invalidate on the
frame which contains the panel but that seems to cause problems for other
items in the frame.
If however I setSize to a different value it (painfully) repaints the
whole frame and displays the current items in the panel correctly.
It looks like after the container is invalidated it is not repainted
unless it is a native like comonent:
if ( (child.flags & IS_NATIVE_LIKE) != 0 )
What is the proper way to get things looking correct after
removing/adding items from a container in a frame?
More information about the kaffe