The JavaTM Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Trail: Creating a GUI with JFC/Swing
Lesson: Working with Graphics

Working with Graphics: Examples (1.1/1.2)

The table that follows lists every 1.1/1.2 example in the Working with Graphics lesson, with links to required files and to where each example is discussed.

Note: These examples use the Swing 1.1 API, which is supported by J2SE 1.2 and compatible releases, as well as JDK 1.1 + JFC/Swing 1.1.

Examples are applets unless noted otherwise. See Getting Started with Swing (in the Creating a GUI with JFC/Swing trail) for details about releases and instructions on compiling and running programs.

You can get the source, image, and other files required for all these examples by downloading the Tutorial Examples bundle (outside of the tutorial), which contains the files in the correct hierarchy. If you download an individual example, take care to have all the necessary files in the proper hierarchy when you compile and run it. For example, many examples expect their image files to be in a directory named images that's in the same directory as the example's class files.

Source Files Image & Other Files Where Described
AnimatorAppletTimer.java (in a .java source file) To run the applet: AnimatorAppletTimer.html
To view the <APPLET> tag: AnimatorAppletTimer.atag
Creating an Animation Loop with Timer
AnimatorApplicationTimer.java (in a .java source file) (an application)   Creating an Animation Loop with Timer
CoordinatesDemo.java (in a .java source file) To run the applet: CoordinatesDemo.html
To view the <APPLET> tag: CoordinatesDemo.atag
Overview of Custom Painting
FontDemo.java (in a .java source file) To run the applet: FontDemo.html
To view the <APPLET> tag: FontDemo.atag
Working with Text
ImageDisplayer.java (in a .java source file) rocketship.gif
To run the applet: ImageDisplayer.html
To view the <APPLET> tag: ImageDisplayer.atag
Overview of Custom Painting
ImageSequenceTimer.java (in a .java source file) Several images.
To run the applet: ImageSequenceTimer.html
To view the <APPLET> tag: ImageSequenceTimer.atag
Displaying a Sequence of Images
MTImageSequenceTimer.java (in a .java source file) Several images.
To run the applet: MTImageSequenceTimer.html
To view the <APPLET> tag: MTImageSequenceTimer.atag
Improving the Appearance and Performance of Image Animation
MovingImageTimer.java (in a .java source file) rocketship.gif, starfield.gif
To run the applet: MovingImageTimer.html
To view the <APPLET> tag: MovingImageTimer.atag
Moving an Image Across the Screen
MovingLabels.java (in a .java source file) rocketship.gif, starfield.gif
To run the applet: MovingLabels.html
To view the <APPLET> tag: MovingLabels.atag
Moving an Image Across the Screen
RectangleDemo.java (in a .java source file) To run the applet: RectangleDemo.html
To view the <APPLET> tag: RectangleDemo.atag
Painting Shapes
SelectionDemo.java (in a .java source file) starfield.gif
To run the applet: SelectionDemo.html
To view the <APPLET> tag: SelectionDemo.atag
Overview of Custom Painting
ShapesDemo.java (in a .java source file) To run the applet: ShapesDemo.html
To view the <APPLET> tag: ShapesDemo.atag
Painting Shapes
TextXY.java (in a .java source file) To run the applet: TextXY.html
To view the <APPLET> tag: TextXY.atag
Working with Text

Animation Images

T1.gif, T2.gif, T3.gif, T4.gif, T5.gif,
T6.gif, T7.gif, T8.gif, T9.gif, T10.gif

Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail > Start of Lesson Search
Feedback Form

Copyright 1995-2003 Sun Microsystems, Inc. All rights reserved.