Use the Java documentation as a quick reference to find information on java library classes to complete the exercises.
Write a simple java applet class to display the message "Hello World!" (use the lecture notes for guidance).
Create a html file hello.html to load your applet.
Compile and run your applet class using the appletviewer utility:
> javac HelloApplet.java
> appletviewer hello.html
Now load your applet in your web-browser (Netscape/Internet Explorer). Remember you should enable the Java console on your web-browser.
Modify the text graphics font and colour for your applet.
Add a main() function so that the applet can be run as a stand-alone application.
> java HelloApplet
Copy and run the simple TextIOApplet . Create a simple html document to run the application in a browser.
Modify the TextIOApplet to create a CircleApplet which reads in a circle radius and computes the circle area. Use the java Circle class written in Exercise 7 part 3 to compute the circle radius.
Create an applet to implement each stage in the applet life-cycle and print out a
message to the console LifeApplet . Your applet should
overload the following Applet class member functions:
public void init();
public void start();
public void paint();
public void stop();
public void destroy();
Modify the applet to display the time when the applet was last started and stopped using the java.util.Data class.
Create an applet to listen to mouse events MouseApplet . This class uses the MouseListener to idenfity mouse button pressens. Modify this applet to draw a circle at the mouse position each time the left mouse button is clicked.
Modify the applet to draw lines of the mouse position when the mouse is dragged. Use the MouseMotionListener interface.
Using the coarse notes as a guide write a simple applet to read and display an image. Use this to display the images used in the assignment exercise.
Use the java.awt.image package to manipulate the image and display a modified version.