|
Due Sunday, 12/3/00 at 11:59 PM This week we will get our first taste of an Applet in Java. We will also explore the use of multiple threads in a program and how to control the behavior of one thread from another. To accomplish these pedagogical goals, we will build an animation that is very similar in concept to BallWorld. You didn't realize it then, but the Timer object actually spawned a new thread that periodically called the actionPerformed() method of its ActionListeners. This is why the application's buttons still worked when the animation was running and why the screen repainted on regular intervals. This can be a tough lab for some and involves the integration of many concepts and techniques. Do not hesitate to ask lots of questions and please use the various communications tools (e.g. discussion newsgroup) liberally! Before you start, review the following sections in the Java Resources web site: Note: that this week's lab may not run in most browsers due to the lack of Java 2 support in the browsers. See the info on how to get Java 2 applets to work properly in browsers with the correct plug-in. Click here to see the documentation of the Neko applet Click here to see a demo of the lab.Getting Ready
Here's a neat applets that some people have written. Our applet will be different than these, but still shares many similar ideas: http://www.svengato.com/neko.html http://acs.senecac.on.ca/~michael/programs/java/neko1.1/neko.html http://www.student.ipfw.edu/~parecl01/class/neko.htm
Laboratory written by Stephen Wong and Antonio Garcia
|