JAVA GRAPHICS EXAMPLES

 

 

Program

Concepts

AWT1.java creating an unadorned Frame (nothing happens)
AWT2.java making the Frame visible (tiny Frame appears)
AWT3.java setting the size & registering a window listener
AWT4.java subclassing Frame,  paint() method
AWT5.java add buttons (with the default border layout)
AWT6.java make the buttons do something
AWT7.java button program with internal state
AWT8.java more about border layouts
AWT9.java grid layouts
AWT10.java flow layouts
AWT11.java labels and text fields
AWT12.java using panels to improve layout
AWT13.java numerical input from a text field
AWT14.java making things look prettier (colors, fonts, gaps)
skeleton.java a skeleton for a simple AWT program 
(doesn't compile as given; you need to fill in some blanks)

Most of these programs also need WindowDestroyer.java (from Savitch) to run properly.