Asst 7: Due 12/5, any time Working with Java and frameworks In this assignment, you will get a taste of Java (if you haven't already tried the language) as well as deal with a simple example of working within a GUI framework. The files Asst7.java and asst7.html define a simple Java applet (an applet is a program designed to be invoked from within a Web page). This applet defines a 400x400 pixel drawing area, and responds to mouse clicks and drags within that area by drawing some colored lines and rectangles. Your task is to write your own applet, using the same basic elements. The restrictions are: 1) You should work by replacing any or all the mouseUp, mouseDown, mouseDrag and paint functions for the class DrawingArea. You may also add/remove/alter any data members you like to that class. 2) The Asst7 class should be left alone. 3) You should restrict your actual graphics to the functions: clearRect (x, y, width, height), drawLine (x1, y1, x2, y2), drawOval (x, y, width, height), drawRect (x, y, width, height), fillOval (x, y, width, height), fillRect (x, y, width, height). You will find documentation on these at http://java.sun.com/products/jdk/1.1/docs/api/java.awt.Graphics.html 4) The resulting applet must be interactive. It should do SOMETHING in response to any mouse click. It may optionally respond to drags as well. 5) There should be no changes required to the asst7.html file. Be creative! See how interesting an applet you can make within this limited domain. (I will post the most interesting applets in the course web pages.) ----------------------- Working with java: The makefile that is provided will control compilation (and, for some of you, execution) of the Java compiler and interpreter. Simply typing "make" will compile the Asst7.java file on our system. (If you have a Java development kit on some other machine, you will need to figure out for yourself how to invoke it properly.) If you are seated at one of our workstations, running X windows, then typing make run will recompile the Asst7.java file if necessary, and then run the resulting applet. If you are working from a remote site (or if you simply don't like using the above method), then you can use a Java-capable browser to run the compiled applet. Type make view (on a CS Dept workstation) to recompile the Asst7.java file if necessary, and to then install the resulting applet in your own web page. You can then view the applet by pointing a web browser at http://www.cs.odu.edu/~yourLoginName/Asst7/asst7.html ------------------- What to turn in: Create a submission directory. Within that directory, place your .java file(s). If you have added additional .java files or renamed, also put an updated makefile in that directory. The makefile should support the same functions as the original one. As always, do NOT submit executable code, compiled object code, etc. Any special notes, discussion, or explanation of unusual situations should go in a README.TXT file in the main submission directory. Use the command "submit cs412" to submit your submission directory. Your programs will be compiled and tested using automatic scripts, so exact adherence to instructions is important. ------------------------------