I\'m creating a program to keep track of a list of DVD\'s. On the main page I have set up 2 JButtons. When the user clicks the one that says new, a new JFrame from another c
I had a similar problem and used jFrameInstanceVariable.setVisible(false); as the action that occured when I hit my CANCEL button. But every time I clicked the button that popped up the JFrame afterward, all the old content was still there in addition to the new content created from pressing the button.
I fixed this by making a new instance of JFrame every time the button is pressed that pops up the JFrame.