EE-WEB Assignment 7

Program 1, 30pts.

Write a program in Java that can be run both as an application and an applet. The program should load an image from the Internet, and display it always in the center of the application frame (that can be resized) or the applet. The image should be passed as an applet parameter, or application command line parameter. If not specified diosplay a default image. The program should also allow to draw over the image using mouse. Resizing the frame or double clicking the mouse should erase the drawing and redisplay the original image. Use double buffering in order to restore the drawing after the applet or application frame is covered by another object on the screen. Install the applet on your Web site but do not post the source code until the assignment is graded.

Hints: use the class examples for displaying an image, for double buffering of a resizable frame, and for accessing and passing parameter in applications/applets. Modify as necessary and combine them together. Remember to post your default image on your Web site.

Homework Submission

Attach all source code in files with proper names and extensions (*.html, *.java, *.pl, *.php, .htaccess e.t.c.). Do not ZIP files together or include compiled files (e.g. *.class). In case of dynamic Web pages (JavaScript or CGI) or Java applets also send the complete URL (including http://) that points to a page on your Web site that demonstrates your homework. Send your homework via e- mail to the instructor at olekmali at cegt201.bradley.edu. Please set the message subject to: web-hw7.

Thank you.

web site front local main page local list page print this page   general bookmarks software bookmarks go back close this page copyright info   visitor counter