From first frame I call another frame:
frame2 fr2 = new frame2();
fr2.setVisible(true);
but when I’m trying to close in the same way – no reaction
frame2 fr2 = new frame2();
fr2.setVisible(false);
All that I do using two buttons on first frame
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
by this, you are creating a new instance of frame2 and hiding it and you are not doing anything to the frame2 instance that you have already created and hence
no reactionWhat you should do is create a class field or something similar to hold reference to the instance of frame2 you create at first (when you show it) and then use the same reference and call
setVisible(false).