@Action public void showAboutBox() { if (aboutBox == null) { JFrame mainFrame = SimEvacApp.getApplication().getMainFrame(); aboutBox = new SimEvacAboutBox(mainFrame); aboutBox.setLocationRelativeTo(mainFrame); } SimEvacApp.getApplication().show(aboutBox); }
private void openMenuItemActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_openMenuItemActionPerformed final JFileChooser fc = new JFileChooser(new File("./Configuración")); FileNameExtensionFilter filtro = new FileNameExtensionFilter("Mundos", "xml"); fc.setFileFilter(filtro); int returnVal = fc.showOpenDialog(this.mainPanel); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fc.getSelectedFile(); PanelSimulación panel = new PanelSimulación(true, 200, file); panel.setSize(panelSimulación1.getWidth(), panelSimulación1.getHeight()); setComponent(panel); // panel.iniciarSimulación(); panelSimulación1 = panel; panel.validate(); SimEvacApp.getApplication().show(this); // log.append("Opening: " + file.getName() + "." + newline); } else { // log.append("Open command cancelled by user." + newline); } } // GEN-LAST:event_openMenuItemActionPerformed