Conclusion


This chapter presented the Painter application, a graphics tool that lets you draw your own images, or modify already-existing images, with a variety of Java2D effects.

Painter lets you draw different graphics figureslines, ellipses, rectangles, rounded rectangles, text, and freehand drawingwith the mouse. You can watch your new graphics figure being stretched into place as you drag the mouse. And you can load in images from GIF, JPG, or PNG files, or you can create new images from scratch.

Painter gives you a whole palette of graphics effects as well. You can draw thick lines and select the drawing color. You can select from a variety of fill techniques: plain fill, solid fill, gradient fill, and texture fill, where you can supply your own texture in an image file named tile.jpg. You can also draw figures "transparently," where the image underneath shows through, as well as give them a drop shadow, which produces a 3D quality.

Very cool.



    Java After Hours(c) 10 Projects You'll Never Do at Work
    Java After Hours: 10 Projects Youll Never Do at Work
    ISBN: 0672327473
    EAN: 2147483647
    Year: 2006
    Pages: 128

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net