This content has been marked as final. Show 1 reply
Well, yeah, when you click the button then this code will run:
And presumably that causes the new login frame to appear. So if you don't want that code to be executed, don't put it there.
Login l=new Login(); l.setVisible(true);
If your only goal is to not have the new login frame appear, then just remove those two lines of code and the method won't do anything at all. If you have a more complex goal, like you want the login frame to appear only sometimes, based on certain conditions, then change that code to incorporate those conditions.
Sorry if that sounds vague -- all we know about your system is that it contains two lines of code which you don't like.