Save Function:
Java applet link: http://icac.no-ip.org/brian/applet2/
In this exercise, we added a save function to our paint tool. The save function itself was easy, however the challenging part was being able to save multiple images without overwriting the previous saved image. For example, if I pressed the save button once, it would create a new file as "img.jpeg." However, if I saved a new image, it would also save as "img.jpeg" overwriting the original file. To resolve this problem, I created a new integer x, and saved the file format as save("img"+x+".jpeg") with x++;. This command would allow me to add a new number to each image that I save.
Monday, October 5, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment