I have a simple object which extends JPanel
, when the update()
method is called on this object it it meant to add some labels to the panel and then rep
Try calling revalidate(); repaint is not what you want.
As per:
API Docs
Note: If a component has been added to a container that has been displayed, validate must be called on that container to display the new component. If multiple components are being added, you can improve efficiency by calling validate only once, after all the components have been added.
revalidate() is basically a invalidate() followed by a validate().
See this question.....