I have a problem with the dispose method. . .I got 3 java files with a class name:
The MainProgram java extends JFrame.
The MainPanel.java extends JPanel.
The PageOne.java extends JFrame.
The MainPanel.java is where all the actions and etc. are being set.
The MainProgram.java calls the MainPanel.java to display what is in the MainPanel.java.
All of these works good until I put the dispose(); method on one of the condition. All I want is to close the MainProgram.java before calling or opening the PageOne.java. I thought the use of method dispose(); would be same as using it in JFrame. Can you give a good idea on how to do this? I am using mouseListener on my action.