Skip to content

Commit 7e68f1b

Browse files
committed
Add default close operation to terminate demo
1 parent 2b7e50e commit 7e68f1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/MaterialUISwingDemo.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ public void actionPerformed(ActionEvent e) {
328328
// make everything visible to the world
329329
frame.pack ();
330330
frame.setVisible (true);
331-
331+
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
332+
332333
JFileChooser fileChooser = new JFileChooser ();
333334
fileChooser.showOpenDialog (frame);
334335
}

0 commit comments

Comments
 (0)