Skip to content

Commit b2672f0

Browse files
committed
optimization:窗口关闭更优雅一些
1 parent a8a69e9 commit b2672f0

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/main/java/com/fangxuele/tool/push/ui/Init.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ public static void initTray() {
182182
} else {
183183
App.config.save();
184184
App.sqlSession.close();
185+
App.mainFrame.dispose();
185186
System.exit(0);
186187
}
187188
});

‎src/main/java/com/fangxuele/tool/push/ui/listener/FrameListener.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public void windowClosing(WindowEvent e) {
5151
JOptionPane.WARNING_MESSAGE);
5252
} else {
5353
App.sqlSession.close();
54+
mainFrame.dispose();
5455
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
5556
}
5657
}

0 commit comments

Comments
 (0)