Preparation for better close action

This commit is contained in:
7u83 2018-12-21 23:20:48 +01:00
parent e0fb0921e4
commit 1f07ccd611
2 changed files with 14 additions and 0 deletions

View File

@ -305,6 +305,9 @@
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
</SyntheticProperties>
<Events>
<EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/>
</Events>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>

View File

@ -254,6 +254,11 @@ public class SeSimApplication extends javax.swing.JFrame {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setMinimumSize(new java.awt.Dimension(640, 480));
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
formWindowClosing(evt);
}
});
stopButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/opensesim/resources/icons/stop.gif"))); // NOI18N
stopButton.setText("Stop");
@ -580,6 +585,7 @@ public class SeSimApplication extends javax.swing.JFrame {
}// </editor-fold>//GEN-END:initComponents
private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitMenuItemActionPerformed
dispose();
System.exit(0);
}//GEN-LAST:event_exitMenuItemActionPerformed
@ -979,6 +985,11 @@ public class SeSimApplication extends javax.swing.JFrame {
ExchangeListDialog.runDialog(this, godworld);
}//GEN-LAST:event_exchangesMenuItemActionPerformed
private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
// TODO add your handling code here:
System.out.printf("Closing Windows\n");
}//GEN-LAST:event_formWindowClosing
public static class Pojo {
public String getSymbol() {