Java Academy
Part I: Elementary Java
Prerequisites
Online Java Resources
Software
Notation
Applications Programming Interface
Variable Conventions
Java Applets
Applets and Applications
My First Applet
Class Definition
Methods and Arguments
Importing Java Classes
HelloWorld.java
The Java Compiler
HelloWorld.html
The <APPLET> Tag
The <OBJECT> Tag
Viewing the Applet
Applet Development Cycle
Understanding Applet Methods
Applet Methods
Overriding Applet Methods
Applet Life Cycle
The paint Method
Overriding the paint Method
Revised Life Cycle
The update Method
The repaint Method
Clearing the Applet
Definition of update
Elementary Java Graphics
Graphics Concepts
Coordinate System
Applet Dimensions
Graphics Methods
The drawLine Method
The drawRect Method
The drawRoundRect Method
The draw3DRect Method
The drawOval Method
The drawArc Method
Fill Methods
Java Geometry
The Polygon Class
The addPoint Method
TriangleTest Applet
TriangleTest Applet (cont’d)
An Equilateral Triangle
QuadrilateralTest Applet
Another Polygon Constructor
OctagonTest.java
A Regular Octagon
A Surprise!
Email: gcf@npac.syr.edu
Home Page: http://www.npac.syr.edu