i hate to say it but your english is not very good.
ok so i wrote my GUI window and then a second one. so when the user clicks the button but when the user clicks the window stays open
means nothing to me.
there are a few different Gui's that do different things some times theirs a few open and other times i just need the main one on at some points but i can get my different GUI's to close. make more sense?
Joined: Mar 10, 2013
not tying to be a annoyance on the forums but im trying to learn GUIs so some help would be nice. i build this program that has some clicks that go to diffrent questions but when i call the new windows the old one dose not close.
Sorry but it's hard for people to help you if you don't clearly explain what your code is supposed to do and what it is actually doing.
I've had a quick look at your code and a problem I can see is (and I've no idea if it's the one causing your problem because like Rob I'm unclear as to what the issue is), in the actionPerformed() method you are creating a new JFrame and overwriting the value in jf and so any future calls to jf's methods will be on the new instance and not the instance that is currently displayed.