I'm working on a RMI client server program. And for my client class I want when I start the client to have a window for verification of the password. If the password is wrong a pop-up message will appear, and if it's correct the current window needs to close and another window with options to work with the server should appear. The code for such an action would be something like that:
//Button for checking password - actionListener
if(!checkPass(btnLogin.getPassword())
JOptionPane.showMessageDialog(null,"ALERT MESSAGE",JOptionPane.WARNING_MESSAGE);
else
// do something so this window closes and a new window,
//with say one button for example, pop-ups
How should I do something like that? The current code is just the back-bone of the client with the remote methods and it also inherits from a jFrame
which is currently the password checking window. Keep in mind, that I'm trying to keep all the client gui and functionality in one class. Should the two windows be jPane
s and how should I deal with them. I'm lost here so any kind of help is welcomed :)