dispose JFrame on close instead of exit, System.exit removed
thanks to Dima for the patch git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@269 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
@@ -75,17 +75,11 @@ public class UsbView extends JFrame {
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private void initialize() {
|
private void initialize() {
|
||||||
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||||
this.setJMenuBar(getJJMenuBar());
|
this.setJMenuBar(getJJMenuBar());
|
||||||
this.setSize(APP_WIDTH, APP_HIGHT);
|
this.setSize(APP_WIDTH, APP_HIGHT);
|
||||||
this.setContentPane(getJContentPane());
|
this.setContentPane(getJContentPane());
|
||||||
this.setTitle("USB View");
|
this.setTitle("USB View");
|
||||||
this.addWindowListener(new java.awt.event.WindowAdapter() {
|
|
||||||
@Override
|
|
||||||
public void windowClosing(java.awt.event.WindowEvent e) {
|
|
||||||
System.exit(0);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user