Summary

 <  Day Day Up  >  

This chapter introduced you to the concepts and rules that will enable you to create Swing components that perform custom painting. Although the chapter doesn't explicitly talk about implementing an icon or border, the rules are similar. An icon or border is just an object that knows how to paint itself; it needs a component to provide the graphics context. An example of implementing a custom icon is in Creating a Custom Icon Implementation (page 618) in Chapter 9.

For information on painting, see the The Java Tutorial 's 2D Graphics trail. [11] Another great resource is the online newsletter The Swing Connection , which has articles such as "Painting in AWT and Swing" [12] and "Unleash Your Creativity with Swing and the Java 2D API!" [13]

[11] The 2D Graphics trail is included on this book's CD and is also available online at: http://java.sun.com/docs/books/tutorial/2d/index.html.

[12] This article is online at: http://java.sun.com/products/jfc/tsc/articles/painting/.

[13] This article is online at: http://java.sun.com/products/jfc/tsc/articles/swing2d/.

If you run into any problems, you should consult the section Solving Common Painting Problems (page 740) in the Appendix.

 <  Day Day Up  >  


JFC Swing Tutorial, The. A Guide to Constructing GUIs
The JFC Swing Tutorial: A Guide to Constructing GUIs (2nd Edition)
ISBN: 0201914670
EAN: 2147483647
Year: 2004
Pages: 171

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