In the snippet below, ParentClass starts the controller, then hides. It would be nice to kill ParentClass on. jMenuItemExitActionPerformed.
In retrospect, I should have reversed the relationship between parents and children, but at this point it would be a big change. Is there an easier way?
public class ParentClass extends javax.swing.JFrame {
private void processC() {
JFrame controller = new Controller();
this.setVisible(false);
...
public class Controller extends javax.swing.JFrame {
private void jMenuItemExitActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
...
source
share