1. Home
  2. Computing & Technology
  3. Java

Create a Simple Window Using JFrame

By , About.com Guide

2 of 7

Create the Application Class

Application Class

Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation.

Below the import statements goes the class definition that will contain our Java application code. Type in:

//Create a simple GUI window
public class TopLevelWindow {

}

All the rest of the code from this tutorial needs to go between the two curly brackets. The TopLevelWindow class is like the covers of a book; it shows the compiler where to look for the main application code.

Explore Java
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Java
  4. Tutorials
  5. Create the Application Class

©2009 About.com, a part of The New York Times Company.

All rights reserved.