I'm trying to open a JFrame
which is in class B by clicking on a button which is present in Class A. I'm using JFrameForm in the project. How would I achieve this?
I tried using this code,it successfully opens the JFrame in Class B (JDBC_Trial) but doesn't close the existing one in class A
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new JDBC_Trial().setVisible(true);
}
});
// TODO add your handling code here:
}