O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Java Applications

Applications are invoked from the command line and executed by the java interpreter. From the developer's point of view, there are primarily two differences between a Java applet and a Java application:

  • An application must include a main method.

  • If the application requires a window, it must extend the AWT Frame class.

A Frame is a window in which the application is displayed and, like all containers, comes with a layout manager for positioning and sizing its components. Additionally, a frame has insets that which must be taken into account when manually placing objects are manually placed—see “Differences Between Applets and Applications”.

There is one other notable distinction between a Java application and a Java applet. An ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required