if (source == loginbtn )
{
JFrame frame = new JFrame ("AdministratorLogin");
frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add (new AdministratorLogin());
frame.pack();
frame.setLocationRelativeTo(null);
frame.toFront();
frame.setVisible (true);
frame.setResizable(false);
//the commented dispose code will give me an error of cannot find symbol
// dispose();
}
cretaros
0
Junior Poster in Training
Recommended Answers
Jump to PostBecause there is no handle for the member method dispose(), hence there is no idea about which frame is to be disposed. Try:
frame.dispose();
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.