Homework1
Research by loading these files on as many different browser types and versions as you can find (e.g. IE, Opera, Safari and Mozilla family). Snapshot what happens and include these images on your web site.
Click to see Homework1
Homework2
Experiment with applet graphics (AWT and Swing). Create a simple applet to draw a red square and a green circle (hint: Use drawRect/fillRect and drawOval/fillOval methods - Sebesta has examples).
Click to see Homework2
Homework3
Add to your applet to draw a third shape, determined by parameters passed from the HTML file that determine the shape and colour to draw.
Click to see Homework3
Homework4
Write a brief (<200 words) essay outlining the differences between AWT and Swing graphics. You may find it useful to visit the Sun Java website.
Click to see Homework4
Homework5
For additional credit: use threads to implement some sort of animation ... try moving the shapes around. Maybe you could implement a pingpong game.
Click to see Homework5
Bonus
setting up your Apache server to work with servlets
Click to see Bonus
Copyright © 周钊平(Zhou Zhaoping)