Hi, I have an application in java that has a main
and from this call to an interface that is with .form
and .class
once I create it I want with a button to access another screen and that this is eliminated but I can not get any advice what I have so far is the following:
JFrame frame = new JFrame("UI");
frame.setContentPane(new UI().mainPanel);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
panel.setVisible(false);
I tried with dispose and it does not work for me either