8154365: JFrame.setDefaultCloseOperation is prohibited in jtreg
Reviewed-by: prr, alexsch
--- a/jdk/test/sanity/client/lib/SwingSet3/README Tue Apr 19 09:21:45 2016 -0700
+++ b/jdk/test/sanity/client/lib/SwingSet3/README Tue Apr 19 11:42:29 2016 -0700
@@ -1,4 +1,4 @@
This content of this src folder was originally taken from SwingSet3 demo project: https://java.net/projects/swingset3/.
Then it was modified to increase testability and remove extra content and extra dependencies.
-Do NOT modify files in it.
\ No newline at end of file
+This is NOT the official location of the SwingSet3 demo.
\ No newline at end of file
--- a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/button/ButtonDemo.java Tue Apr 19 09:21:45 2016 -0700
+++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/button/ButtonDemo.java Tue Apr 19 11:42:29 2016 -0700
@@ -215,7 +215,6 @@
javax.swing.SwingUtilities.invokeLater(() -> {
JFrame frame = new JFrame(DEMO_TITLE);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(buttonDemo);
frame.pack();
frame.setVisible(true);
--- a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/combobox/ComboBoxDemo.java Tue Apr 19 09:21:45 2016 -0700
+++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/combobox/ComboBoxDemo.java Tue Apr 19 11:42:29 2016 -0700
@@ -120,7 +120,6 @@
public static void main(String[] args) {
JFrame frame = new JFrame(DEMO_TITLE);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new ComboBoxDemo());
frame.setPreferredSize(new Dimension(800, 600));
frame.pack();
--- a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/list/ListDemo.java Tue Apr 19 09:21:45 2016 -0700
+++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/list/ListDemo.java Tue Apr 19 11:42:29 2016 -0700
@@ -90,7 +90,6 @@
public static void main(String[] args) {
JFrame frame = new JFrame(DEMO_TITLE);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new ListDemo());
frame.setPreferredSize(new Dimension(800, 600));
frame.pack();
--- a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/optionpane/OptionPaneDemo.java Tue Apr 19 09:21:45 2016 -0700
+++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/optionpane/OptionPaneDemo.java Tue Apr 19 11:42:29 2016 -0700
@@ -93,7 +93,6 @@
public static void main(String[] args) {
JFrame frame = new JFrame(DEMO_TITLE);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new OptionPaneDemo());
frame.setPreferredSize(new Dimension(800, 600));
frame.pack();
--- a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/progressbar/ProgressBarDemo.java Tue Apr 19 09:21:45 2016 -0700
+++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/progressbar/ProgressBarDemo.java Tue Apr 19 11:42:29 2016 -0700
@@ -64,7 +64,6 @@
public static void main(String[] args) {
JFrame frame = new JFrame(DEMO_TITLE);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new ProgressBarDemo());
frame.setPreferredSize(new Dimension(800, 600));
frame.pack();
--- a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/scrollpane/ScrollPaneDemo.java Tue Apr 19 09:21:45 2016 -0700
+++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/scrollpane/ScrollPaneDemo.java Tue Apr 19 11:42:29 2016 -0700
@@ -64,7 +64,6 @@
public static void main(String[] args) {
JFrame frame = new JFrame(DEMO_TITLE);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new ScrollPaneDemo());
frame.setPreferredSize(new Dimension(800, 600));
frame.pack();
--- a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/spinner/SpinnerDemo.java Tue Apr 19 09:21:45 2016 -0700
+++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/spinner/SpinnerDemo.java Tue Apr 19 11:42:29 2016 -0700
@@ -58,7 +58,6 @@
public static void main(String[] args) {
JFrame frame = new JFrame(DEMO_TITLE);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new SpinnerDemo());
frame.setPreferredSize(new Dimension(800, 600));
frame.pack();
--- a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/splitpane/SplitPaneDemo.java Tue Apr 19 09:21:45 2016 -0700
+++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/splitpane/SplitPaneDemo.java Tue Apr 19 11:42:29 2016 -0700
@@ -86,7 +86,6 @@
public static void main(String[] args) {
JFrame frame = new JFrame(DEMO_TITLE);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new SplitPaneDemo());
frame.setPreferredSize(new Dimension(800, 600));
frame.pack();
--- a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/textfield/TextFieldDemo.java Tue Apr 19 09:21:45 2016 -0700
+++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/textfield/TextFieldDemo.java Tue Apr 19 11:42:29 2016 -0700
@@ -115,7 +115,6 @@
public static void main(String[] args) {
JFrame frame = new JFrame(DEMO_TITLE);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new TextFieldDemo());
frame.setPreferredSize(new Dimension(800, 600));
frame.pack();
--- a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/togglebutton/ToggleButtonDemo.java Tue Apr 19 09:21:45 2016 -0700
+++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/togglebutton/ToggleButtonDemo.java Tue Apr 19 11:42:29 2016 -0700
@@ -151,7 +151,6 @@
public static void main(String[] args) {
JFrame frame = new JFrame(ToggleButtonDemo.class.getAnnotation(DemoProperties.class).value());
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new ToggleButtonDemo());
frame.setPreferredSize(new Dimension(800, 600));
frame.pack();
--- a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/tree/TreeDemo.java Tue Apr 19 09:21:45 2016 -0700
+++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/tree/TreeDemo.java Tue Apr 19 11:42:29 2016 -0700
@@ -65,7 +65,6 @@
public static void main(String[] args) {
JFrame frame = new JFrame(DEMO_TITLE);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new TreeDemo());
frame.setPreferredSize(new Dimension(800, 600));
frame.pack();
--- a/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/window/WindowDemo.java Tue Apr 19 09:21:45 2016 -0700
+++ b/jdk/test/sanity/client/lib/SwingSet3/src/com/sun/swingset3/demos/window/WindowDemo.java Tue Apr 19 11:42:29 2016 -0700
@@ -150,7 +150,6 @@
JFrame frame = new JFrame();
WindowDemo demo = new WindowDemo();
frame.add(demo);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
demo.start();