I have created a login form where users will enter their credentials and navigate to other frame. This frame to frame transition is working fine. But I also added a admin login from a invisible label in the bottom.
When the admin clicks the invisible label on the user login frame (NewJFrame), a custom login panel (Admin) should be opened.
But when I click the label, JPanel
is not showing.
private void jLabel6MouseClicked(java.awt.event.MouseEvent evt)
{
Admin o = new Admin(); // Admin is a login panel
NewJFrame o1= new NewJFrame();
o1.add(o); // Throwing an Exception here
// TODO add your handling code here:
}