[ Back | Previous | Next ]

How to add a innerclass to a static method, windowadapter?

Package:
java.lang.*
Product:
JDK
Release:
1.1.x
Related Links:
General
General
General
General
General
General
General
General
General
Runtime
System
Comment:
   public static void main( String [] args) 
   {
      try
      {
         Terras tt = new Terras();

         f = new Frame( );
         f.setTitle("Terras " + system.getProperty("terras.version",VERSION));
         int width = Integer.parseInt( system.getProperty("terras.width"));
         int height = Integer.parseInt( system.getProperty("terras.height"));
         f.setBackground( Color.getColor("terras.background", Color.white ) );
         f.setForeground( Color.getColor("terras.foreground", Color.black ) );
         f.setSize( width, height);
         f.add( tt );
         f.addWindowListener( tt. new AppAdapter() );

         f.setVisible( true );
         tt.start();
      }         
      catch (Throwable th)
      {  
         th.printStackTrace();
         th = null;
         System.exit(1);
      }
   }
1