Java primer for Graphical Programs
There is no way we can teach you graphical user interfaces in one Web page, but maybe it is enough to get you started.
Find these classes in java.awt to see how to execute such tasks as drawing a circle using drawOval() and setting the current drawing color using setColor().
Draw within an Applet
To draw on the screen within an applet, override the applet's paint() method. This method takes an instance of the class Graphics. Graphics defines two methods called setColor() and
drawOval() that you can use for this exercise.
The java.awt library defines a class called Color that defines static variables representing system colors.
Respond to mouseclicks
To respond to mouseclicks, override mousePressed(). This method takes three parameters: an instance of class Event,
and the x and y locations of the mouseclick. This method returns a boolean. You can return what your superclass would normally return by invoking it using super.