Maximux Size yourFrame.setExtendedState(JFrame.MAXIMIZED_BOTH);

import javax.swing.JFrame;


  setDefaultCloseOperation(EXIT_ON_CLOSE);

 yourFrame.setExtendedState(JFrame.MAXIMIZED_BOTH);



//======================Log In Button ===============

  if(username.getText().equals("admin")&&password.getText().equals("admin")){

            new DashBoard().setVisible(true);

            this.setVisible(false);

           // System.exit(0);

        }else{

              JOptionPane.showMessageDialog(null, "Log In Error","Invalid Username or Password.",JOptionPane.ERROR_MESSAGE);

        }


//=====Minimize button 

JInternalFrame internalFrame = new JInternalFrame(

    "My Frame",    // Title

    true,          // Resizable

    true,          // Closable

    true,          // Maximizable

    true           // Iconifiable (adds minimize button)

);



Comments

Popular posts from this blog

Remove (Clear) and remove Selected element

JSpinner

🛢️ MySQL Connection & CRUD Operations in Java