Dear friends,
Thanks in advance.....
I'm working on project which includes multiple frames.
whenever I need to open other frame with first one get closed , I have used new instance of new class(frame) and I just make setVisible(false) for previous frame.
Now after some use , there is problem of heap memory full.
Tell me what should I do to free the current frame object instead of setVisible(false)?
waiting for reply.......
I have used the code like below,
new MainWindow().setVisible(true);
setVisible(false);