After adding/removing the components we have to callvalidate() of the applet class. This will cause appletcontainer to lay out its subcomponents again after thecomponents it contains have been added to or modified.