exit on close

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@295 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 148ba04303
commit 3242b98a08
  1. 6
      jode/jode/swingui/Main.java

@ -72,6 +72,7 @@ public class MainWindow
if (node != null && classModel.isLeaf(node)) { if (node != null && classModel.isLeaf(node)) {
lastClassName = classModel.getFullName(node); lastClassName = classModel.getFullName(node);
decompileThread = new Thread(this); decompileThread = new Thread(this);
decompileThread.setPriority(Thread.MIN_PRIORITY);
sourcecodeArea.setText("Please wait, while decompiling...\n"); sourcecodeArea.setText("Please wait, while decompiling...\n");
decompileThread.start(); decompileThread.start();
} }
@ -164,6 +165,11 @@ public class MainWindow
win.setClasspath(cp.replace(File.pathSeparatorChar, ',')); win.setClasspath(cp.replace(File.pathSeparatorChar, ','));
frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
frame.pack(); frame.pack();
frame.show(); frame.show();
} }

Loading…
Cancel
Save