I would like add a simple code that will call the JFrame from the same package if its fullfill the if statement and if not it'll reprompt the same JFrame. thanks.
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
login lg = new login(username,password);
boolean isMatches = lg.checkUser();
if(isMatches) {
Welcome WEL = new Welcome(); // How to call the Welcome JFrame
WEL.setVisible(true);
}
else
// How to make it reprompt the same JFrame?
}