Class DrawShapes
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----DrawShapes
- public class DrawShapes
- extends Applet
This is a small Java applet to allow people to draw a variety of shapes
on the screen in a variety of colours. As an extension, the user can fill
these shapes with the outline colour.
Extend the "Applet" class as follows:
-
DrawShapes()
-
-
action(Event, Object)
- This function defines an event handler.
Deprecated.
-
init()
- This function is called when the applet is run.
DrawShapes
public DrawShapes()
init
public void init()
- This function is called when the applet is run.
All of the "startup" code is placed here.
Called by the browser or applet viewer to inform this applet that
it has been loaded into the system. It is always called before the
first time that the start method is called.
subclass of Applet should override this method if it has initialization
to perform.
- Overrides:
- init in class Applet
action
public boolean action(Event evt,
Object obj)
- Note: action() is deprecated.
As of JDK 1.1 should register this component as ActionListener
on component which fires action events.
- This function defines an event handler.
Invoked when an action occurs. Handles the action performed.
- Overrides:
- action in class Component