站内搜索: 请输入搜索关键词
当前页面: 图书首页 > JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

Example Programs - JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

Previous Section  < Day Day Up >  Next Section

Example Programs

graphics/cd_icon.gif

You can find source files for all the examples from this chapter on the CD and online:

JavaTutorial/uiswing/14painting/example-1dot4/index.html

http://java.sun.com/docs/books/tutorial/uiswing/14painting/example-1dot4/index.html

The preceding URLs take you to an index that has links to the files required by each example. You can go directly to the entry for a particular example by adding #ExampleName to the URL. Most examples have a "Run" link in the index which executes the example using Java Web Start technology.

Example

Where Described

Notes

CoordinatesDemo

page 136

Lets you familiarize yourself with the coordinate system.

SelectionDemo

page 137

Gives you a feeling for coordinates. To avoid unnecessary painting, the repaint method specifies which area of the component needs to be repainted.

IconDisplayer

page 141

Demonstrates custom painting. The application features a custom component that paints an icon multiple times with all but the rightmost icon transparent.

    Previous Section  < Day Day Up >  Next Section