11/*
22 *
3- * Copyright (c) 2007, 2018 , Oracle and/or its affiliates. All rights reserved.
3+ * Copyright (c) 2007, 2021 , Oracle and/or its affiliates. All rights reserved.
44 *
55 * Redistribution and use in source and binary forms, with or without
66 * modification, are permitted provided that the following conditions
@@ -109,7 +109,6 @@ public class J2Ddemo extends JPanel implements ItemListener, ActionListener, Dem
109109 { "Paths" , "Append" , "CurveQuadTo" , "FillStroke" , "WindingRule" },
110110 { "Transforms" , "Rotate" , "SelectTx" , "TransformAnim" }
111111 };
112- private final boolean demoIsInApplet ;
113112 private JCheckBoxMenuItem controlsCB ;
114113 private JMenuItem runMI , cloneMI , fileMI , backgMI ;
115114// private JMenuItem ccthreadMI, verboseMI;
@@ -122,8 +121,7 @@ public class J2Ddemo extends JPanel implements ItemListener, ActionListener, Dem
122121 /**
123122 * Construct the J2D Demo.
124123 */
125- public J2Ddemo (boolean demoIsInApplet , DemoProgress progress , RunWindowSettings runWndSetts ) {
126- this .demoIsInApplet = demoIsInApplet ;
124+ public J2Ddemo (DemoProgress progress , RunWindowSettings runWndSetts ) {
127125 this .runWndSetts = runWndSetts ;
128126
129127 setLayout (new BorderLayout ());
@@ -171,11 +169,9 @@ private JMenuBar createMenuBar() {
171169 JPopupMenu .setDefaultLightWeightPopupEnabled (false );
172170 JMenuBar menuBar = new JMenuBar ();
173171
174- if (!demoIsInApplet ) {
175- JMenu file = menuBar .add (new JMenu ("File" ));
176- fileMI = file .add (new JMenuItem ("Exit" ));
177- fileMI .addActionListener (this );
178- }
172+ JMenu file = menuBar .add (new JMenu ("File" ));
173+ fileMI = file .add (new JMenuItem ("Exit" ));
174+ fileMI .addActionListener (this );
179175
180176 JMenu options = menuBar .add (new JMenu ("Options" ));
181177
@@ -239,11 +235,7 @@ public void windowClosed(WindowEvent e) {
239235 rf .addWindowListener (l );
240236 rf .getContentPane ().add ("Center" , runwindow );
241237 rf .pack ();
242- if (!demoIsInApplet ) {
243- rf .setSize (new Dimension (200 , 125 ));
244- } else {
245- rf .setSize (new Dimension (200 , 150 ));
246- }
238+ rf .setSize (new Dimension (200 , 125 ));
247239 rf .setVisible (true );
248240 }
249241
@@ -611,7 +603,7 @@ public Insets getInsets() {
611603
612604 frame .setVisible (true );
613605
614- J2Ddemo demo = new J2Ddemo (false , demoProgress , runWndSetts );
606+ J2Ddemo demo = new J2Ddemo (demoProgress , runWndSetts );
615607 demoOneInstArr [0 ] = demo ;
616608
617609 frame .getContentPane ().removeAll ();
0 commit comments