8154365: JFrame.setDefaultCloseOperation is prohibited in jtreg

Reviewed-by: prr, alexsch
This commit is contained in:
Alexander Kouznetsov 2016-04-19 11:42:29 -07:00
parent 51f3901064
commit d7b1616623
13 changed files with 1 additions and 13 deletions
jdk/test/sanity/client/lib/SwingSet3

@ -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.
This is NOT the official location of the SwingSet3 demo.

@ -215,7 +215,6 @@ public final class ButtonDemo extends JPanel {
javax.swing.SwingUtilities.invokeLater(() -> {
JFrame frame = new JFrame(DEMO_TITLE);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(buttonDemo);
frame.pack();
frame.setVisible(true);

@ -120,7 +120,6 @@ public class ComboBoxDemo extends JPanel implements ActionListener {
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();

@ -90,7 +90,6 @@ public final class ListDemo extends JPanel {
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();

@ -93,7 +93,6 @@ public class OptionPaneDemo extends JPanel {
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();

@ -64,7 +64,6 @@ public class ProgressBarDemo extends JPanel {
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();

@ -64,7 +64,6 @@ public class ScrollPaneDemo extends JPanel {
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();

@ -58,7 +58,6 @@ public class SpinnerDemo extends JPanel {
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();

@ -86,7 +86,6 @@ public class SplitPaneDemo extends JPanel {
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();

@ -115,7 +115,6 @@ public class TextFieldDemo extends JPanel {
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();

@ -151,7 +151,6 @@ public class ToggleButtonDemo extends JPanel implements ChangeListener {
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();

@ -65,7 +65,6 @@ public class TreeDemo extends JPanel {
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();

@ -150,7 +150,6 @@ public final class WindowDemo extends JPanel {
JFrame frame = new JFrame();
WindowDemo demo = new WindowDemo();
frame.add(demo);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
demo.start();