APPLET
APPLET
import required
classes and
packages
filename
Your variable
(that can be any
letter/s)
DRAW STRING
String to be Position of
Your variable displayed Strings
y-axis
Code for X-axis
displaying
Strings
SETTING FONT Font.BOLD
Font.PlAIN
Font.ITALIC
Declare
variable
A Color object can be created with this three constructors:
Color.red
Color(R,G,B)
Color(float red, float green, float blue)
For example:
Chosen color Chosen color
Chosen color
Take note, you need to declare
first the color before the output
An oval can be drawn using the method drawOval() as follows:
y-axis
height
x-axis width
width
height
A rectangle can be drawn using the method drawRect() as:
y-axis
height
x-axis width
width
height
A line linking two points can be drawn using the method drawLine() as follows:
2nd point
1stpoint
2nd point y-axis 2nd x and
1stpoint y-axis y axis
x-axis
x-axis
1st x and
y axis
POLYGON
Open the image on paint
CURSOR
X-AXIS
Y-AXIS
After listing all the x and y axis of the marked areas, you can now use the method
fillPolygon() and/or drawPolygon () as follows:
fillPolygon
drawPolygon
Y-AXIS
Total count of numbers
Take note:
X-AXIS the count of numbers on the x and y axis must be equal.
If the X points is 13 then y points should be 13
drawPolygon () method VS drawPolyline() method
End point
BACKGROUND MUSIC
Filename (music)
variable
Declare
variable
Html file