My issue currently is i have hide my jframe1 by using this.setVisible(false) and call for jframe2. but how do i go to the same jframe1 again? i can set jframe1.setVisible(true) but this will call a new jframe1.
The previous jframe1 i hide have mysql data i pull from login form. Now you see, my issue is if i set jframe1 to setVisible(true) from jframe2 it will actually run new jframe1 and all previous data it have wih login form before will lost.
for your information my jframe1 have 2 override class, jframe1() and jframe1(String getUsername, String getPassword). i am using jframe1(String getUsername, String getPassword) to call jframe1 from login form.
Example Situation from jframe1(String getUsername, String getPassword)
//button to move from jframe1 to jframe2 (at jframe1)
private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {
jframe2 frame2 = new jframe2();
this.setVisible(false); // i hide jframe1(String , String) and call jframe2
// i use this.setVissible(false) because i dont know how to put
// jframe1(2 parameter) with setVisible().
frame2.setVisible(true);// call jframe2
}
unhide and call jframe1(String, String) again from jframe2
private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {
jframe1 frame1 = new jframe1(); //i have no idea how create jframe1 instance
//with 2 parameter, perhap this is the reason
// i failed to call previous jframe1
mf.setVisible(true); // unhide and call jframe1, unfortunately it will
// create new jframe1 form, i have no idea how to
// call/unhide the previous jframe1
this.setVisible(false); //hide jframe2