Java Programming Course - Sample Applets
The following Java applets are taken from Bob Fay's Java Programming Course.
These examples are designed to demonstrate fundamental Java concepts
and techniques. Please note that several of these examples need
modifications in order to conform to the newer releases of Java (JDK 1.1
and JDK 1.2).
Example 33
HelloWorldApplet -- an very simple applet.
view source code 
run the applet
Example 34
ColorHelloApplet -- Demonstrates simple use of Font and Color classes.
view source code 
run the applet
Example 35
HTMLParmsApplet -- Demonstrates how to retrieve HTML parms.
view source code 
run the applet with parms
run the applet without parms
Example 36
GraphicsTest -- Demonstrates how to draw all kinds of shapes.
view source code 
run the applet
Example 37
MouseDown1 -- Simple Applet to demonstrate mouseDown() method.
view source code 
run the applet
Example 38
MouseDown2 -- Drawing a circle in response to a mousedown event.
view source code 
run the applet
Example 39
MouseDown3 -- Overriding the update() method.
view source code 
run the applet
Example 40
DrawBox -- Draw a "rubberband" box via mouse drags.
view source code 
run the applet
Example 41
Keys -- Type a key and move with arrow keys.
view source code 
run the applet
Example 42
ButtonActionTest1 -- How to add buttons an respond to button clicks.
view source code 
run the applet
Example 43
ChoiceTest -- How to add a choice component and respond to choice selections.
view source code 
run the applet
Example 44
CheckboxTest -- How to add a checkbox component and respond to
checkbox selections.
view source code 
run the applet
Example 45
RadioButtonTest -- How to add radiobutton components and respond to
radionbutton selections.
view source code 
run the applet
Example 46
ButtonApplet1 -- Positioning components without a Layout manager.
view source code 
run the applet
Example 47
ButtonApplet2 -- Positioning components with the flowlayout manager.
view source code 
run the applet
Example 48
ButtonApplet3 -- Positioning components with the borderlayout manager.
view source code 
run the applet
Example 49
ButtonApplet4 -- Positioning components with the gridlayout manager.
radionbutton selections.
view source code 
run the applet
Example 50
ButtonApplet5 -- Using nested panels and several layout managers.
view source code 
run the applet
Example 51
ListTest -- How to add a listbox component and respond to
checkbox selections.
view source code 
run the applet
Example 52
TextTest -- How to add TextArea and TextField component and respond to
selections.
view source code 
run the applet
Example 53
ColorScroll -- How to add scrollbar component and respond to
scrollbar events.
view source code 
run the applet
Example 72
Bounce1 -- How to animate a bouncing ball (with flicker!)
view source code 
run the applet
Example 73
Bounce2 -- How to animate a bouncing ball (using offscreen buffering
to remove flicker!)
view source code 
run the applet
Example 74
Bounce3 -- How to animate a bouncing ball (with a mouse interface to
leave trails!!!)
view source code 
run the applet