Try calling somePanel.revalidate()
. That will tell the AWT that you have changed the component tree.
EDIT: Changed from invalidate
to revalidate
Try calling somePanel.revalidate()
. That will tell the AWT that you have changed the component tree.
EDIT: Changed from invalidate
to revalidate