Fixed exitApp() not triggering windowClosing()
This commit is contained in:
parent
667e0ee1eb
commit
09b01f3365
1 changed files with 15 additions and 0 deletions
|
@ -253,6 +253,21 @@ public class ManagerFrame extends JFrame implements ActionListener, HashObserver
|
||||||
this.addWindowListener(new WindowAdapter() {
|
this.addWindowListener(new WindowAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void windowClosing( WindowEvent e ) {
|
public void windowClosing( WindowEvent e ) {
|
||||||
|
// The close button was clicked.
|
||||||
|
|
||||||
|
// This is where an "Are you sure?" popup could go.
|
||||||
|
ManagerFrame.this.setVisible( false );
|
||||||
|
ManagerFrame.this.dispose();
|
||||||
|
|
||||||
|
// The following would also trigger this callback.
|
||||||
|
//Window w = ...;
|
||||||
|
//w.getToolkit().getSystemEventQueue().postEvent( new WindowEvent(w, WindowEvent.WINDOW_CLOSING) );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void windowClosed( WindowEvent e ) {
|
||||||
|
// dispose() was called.
|
||||||
|
|
||||||
List<ModFileInfo> sortedMods = new ArrayList<ModFileInfo>();
|
List<ModFileInfo> sortedMods = new ArrayList<ModFileInfo>();
|
||||||
|
|
||||||
for ( int i=0; i < localModsTableModel.getRowCount(); i++ ) {
|
for ( int i=0; i < localModsTableModel.getRowCount(); i++ ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue