In a package in Netbeans I created two JFrame Forms, first one is Login, second is, mainProgram, after the successful log in, I use the following way to "close" the Login frame and open the main program frame.
mainProgram m=new mainProgram();
m.setVisible(true);
setVisible(false); //to hide the log in frame
Is this the correct way? Isn't it wrong if these two separated classes are hidden instead of being closed? are these one process or two different processes? if there's a better way then what is it?
thanks..
Is this the correct way?
Yes, this should be fine.
isn't it wrong if these 2 separated classes are hidden instead of being closed?
The ideal is dispose of your unused forms (such as the login form when not needed any more)
are these 1 process or 2 different processes?
These will run on the same process
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With