I need to reload the frame to the state in which it was earlier loaded that means to return all frame components to the state they were when first put in the frame. Below are the things which I tried which is mentioned in question How can I refresh or reload the JFrame?.
frame.invalidate();
frame.validate();
frame.repaint();
I also tried to remove all the components of frame using frame.removeAll() and reload it but it is also not working ?
Any help is highly appreciated. Thanks