I have a main JFrame containing a JPanel with some stuff in it. Among other things, another JPanel with a list of sub-JPanels and JComponents in it.
What I want to do is to refresh the window (or only the list) by pressing a button in another JFrame. I tried to do it by
Mainclass.frameIWantToRefresh.invalidate();
Mainclass.frameIWantToRefresh.validate();
Mainclass.frameIWantToRefresh.repaint();
But it doesn't work and I have no idea how to do it in another way.
Any clues?