Hello World (in Frame)

import java.awt.*;

public class HelloFrame extends Frame
{
   Button h;

   public HelloFrame ()
   {
      setTitle("Hello World");
      add("Center", h=new Button("Hello World"));
   }

   public static void main (String arg[])
   {
      HelloFrame hello = new HelloFrame();
      hello.resize(300,100);
      hello.show();
   }
}