@@ -133,7 +133,7 @@ public final class Font2DTest extends JPanel
133133 private static boolean canDisplayCheck = true ;
134134
135135 /// Initialize GUI variables and its layouts
136- public Font2DTest ( JFrame f , boolean isApplet ) {
136+ public Font2DTest ( JFrame f ) {
137137 parent = f ;
138138
139139 rm = new RangeMenu ( this , parent );
@@ -165,8 +165,8 @@ public Font2DTest( JFrame f, boolean isApplet ) {
165165 contrastSlider .setPaintLabels (true );
166166 contrastSlider .addChangeListener (this );
167167 setupPanel ();
168- setupMenu ( isApplet );
169- setupDialog ( isApplet );
168+ setupMenu ();
169+ setupDialog ();
170170
171171 if (canDisplayCheck ) {
172172 fireRangeChanged ();
@@ -256,7 +256,7 @@ private void addLabeledComponentToGBL( String name,
256256 }
257257
258258 /// Sets up menu entries
259- private void setupMenu ( boolean isApplet ) {
259+ private void setupMenu () {
260260 JMenu fileMenu = new JMenu ( "File" );
261261 JMenu optionMenu = new JMenu ( "Option" );
262262
@@ -268,11 +268,7 @@ private void setupMenu( boolean isApplet ) {
268268 fileMenu .add ( new MenuItemV2 ( "Page Setup..." , this ));
269269 fileMenu .add ( new MenuItemV2 ( "Print..." , this ));
270270 fileMenu .addSeparator ();
271- if ( !isApplet )
272- fileMenu .add ( new MenuItemV2 ( "Exit" , this ));
273- else
274- fileMenu .add ( new MenuItemV2 ( "Close" , this ));
275-
271+ fileMenu .add ( new MenuItemV2 ( "Exit" , this ));
276272 displayGridCBMI = new CheckboxMenuItemV2 ( "Display Grid" , true , this );
277273 force16ColsCBMI = new CheckboxMenuItemV2 ( "Force 16 Columns" , false , this );
278274 showFontInfoCBMI = new CheckboxMenuItemV2 ( "Display Font Info" , false , this );
@@ -326,11 +322,8 @@ private void setupMenu( boolean isApplet ) {
326322 }
327323
328324 /// Sets up the all dialogs used in Font2DTest...
329- private void setupDialog ( boolean isApplet ) {
330- if (!isApplet )
331- filePromptDialog = new JFileChooser ( );
332- else
333- filePromptDialog = null ;
325+ private void setupDialog () {
326+ filePromptDialog = new JFileChooser ();
334327
335328 /// Prepare user text dialog...
336329 userTextDialog = new JDialog ( parent , "User Text" , false );
@@ -432,8 +425,6 @@ public void fireRangeChanged() {
432425
433426 /// Changes the message on the status bar
434427 public void fireChangeStatus ( String message , boolean error ) {
435- /// If this is not ran as an applet, use own status bar,
436- /// Otherwise, use the appletviewer/browser's status bar
437428 statusBar .setText ( message );
438429 if ( error )
439430 fp .showingError = true ;
@@ -1030,7 +1021,7 @@ public static void main(String[] argv) {
10301021
10311022 UIManager .put ("swing.boldMetal" , Boolean .FALSE );
10321023 final JFrame f = new JFrame ( "Font2DTest" );
1033- final Font2DTest f2dt = new Font2DTest ( f , false );
1024+ final Font2DTest f2dt = new Font2DTest ( f );
10341025 f .addWindowListener ( new WindowAdapter () {
10351026 public void windowOpening ( WindowEvent e ) { f2dt .repaint (); }
10361027 public void windowClosing ( WindowEvent e ) { System .exit (0 ); }
0 commit comments