Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: dispose(); function
02-18-2008, 05:46 PM #1
- Join Date
- Nov 2007
- Thanked 0 Times in 0 Posts
I have a program, which is situated on a JFrame, and when a particular button is clicked, this opens a smaller JFrame (a completley seperate window).
There is then a button on this new JFrame that is meant to close the current frame (the smaller one). I have disabled the "X" button on this secondary frame with:
A simple if statement with a
Anyhow... On this close button on the frame, when I use the dispose(); fucntion, it closes the MAIN Jframe window in the background! Ive tried assigning the dispose function directly to the secondary frame: changeFrame.dispose(); but nothing works. Is there a better way of doing this than using the dispose function, or if not, can someone explain to me how to configure this function to make it close the desired frame?
Thanks in advance.