// This code will work when run as an Applet, but will
// fail when run as an application if the Applet
// peer does not yet exist when init is called.

public void init()
   {
   this.setLayout( null );

   TextArea t = new TextArea();

   // give the TextArea all the room in the Applet
   t.setSize( this.getSize() );
   this.add ( t );

   }