Objectives
To introduce and demonstrate the use of JDK features in sample applets and
applications.
Time Required
60 minutes to become familiar with the contents of the sample projects.
Before You Begin
To add sample projects to your workspace:
The Sun JDK Examples projects will be added to your workspace, and the source code will be compiled.
Description
The Sun JDK samples in VisualAge for Java are the samples provided with Sun's JDK
product. You can run, edit, and manage them within the IDE. See the following
URL for detailed descriptions of each sample and the functionality it demonstrates:
http://www.javasoft.com/products/jdk/1.1/docs/relnotes/demos.html
Running a Sample
To run one of the samples:
You can change the programs settings or edit its code to change the way the sample works. If you want to return to the original edition of the sample, simply reload the earliest edition from the repository.
List of Samples
Sample | Description |
Animator | Uses animation and sound effects. |
ArcTest | Uses arc graphics, painting. |
BarChart | Uses graphics, painting, fonts. |
Blink | Uses string tokenizer. |
CardTest | Demonstrates card layout, mouse events. |
Clock | Demonstrates writing a clock program. |
DitherTest | Demonstrates color dithering. |
DrawTest | Demonstrates a simple graphics editor that uses lines, points, and colors. |
Fractal | Draws a fractal, listens for mouse events. |
GraphicsTest | Displays a variety of shapes and colors. |
ImageMap | Different areas of an image are controlled by ImageArea classes, linked to URLs, sounds, or messages. |
JumpingBox | Listens for all mouse events. |
MoleculeViewer | Mouse dragging controls a three-dimensional molecule graphic. |
NervousText | Demonstrates text animation. |
OpenLookButtons | Demonstrates Openlook buttons. |
RoundButtons | Demonstrates Round buttons. |
SimpleGraph | Graphs a simple mathematic function. |
SortDemo | Sorts lines of various length according to your choice of algorithm. |
Spinner | Demonstrates lightweight spinning objects against a background graphic. |
SpreadSheet | Demonstrates a simple graphical spreadsheet. |
SymbolTest | Demonstrates how adapter classes can be used to avoid creating empty methods to satisfy an event listener interface. |
TicTacToe | Demonstrates creating a simple game. |
WireFrame | Shows how to display a simple three dimensional wire frame, and move it using mouse actions. |
Internationalization (i18n) | Five Samples:
|