ZDraw

ZDraw is a fairly basic drawing applet used to demonstrate the concept of persistence in a drawing applet.

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
GPL (GNU General Public License) 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Kevin Waldron
HOMEPAGE:
www.zazzybob.com
CATEGORY:
ROOT \ Internet \ HTTP (WWW)
1 ZDraw Screenshot:
ZDraw
ZDraw is a fairly basic drawing applet used to demonstrate the concept of persistence in a drawing applet. What do I mean by persistence? Well, take most of the "demo" drawing applets available on the 'net. If you put the applet into the background, resize it, or partially/fully cover it with another window, then the "hidden" portion of the applet loses any drawings that were made.

A simple (and rudimentary) solution to this can be easily implemented using a Vector and creating a new object class LineObject within which we can store the start and end points of each line, together with its colour. Then, when we can override public void paint( Graphics g ) and insert some code that iterates through each element of the vector, repainting each line segment. This way, everytime the applet redraws itself, all of the lines will be repainted, and thus will not be lost!

Last updated on March 12th, 2007

requirements

#drawing applet #Java applet #vector drawing #ZDraw #drawing #Java #applet

Add your review!

SUBMIT