IconTest
This is a simple test of the Icon class, that allows
draggable images as components. To try it, place the cursor on
any of the three images and drag while holding down
the mouse.
Example:
Documentation and Sources:
- Documentation:
-
Icon.html. Generated by javadoc from the Icon class
sources.
-
ImageLabel.html. Generated by javadoc from the ImageLabel class
sources. ImageLabel makes Images as Components, but does
not make them draggable. Icon extends this class.
-
ImageButton.html. Extends ImageLabel into a button.
Generates action events in the same way as Button.
-
IconTest.html. This file. Loads an applet that does a
simple test of the Icon class.
- Source Code:
-
Icon.java. Adds mouse handling to the ImageLabel class.
-
ImageLabel.java. ImageLabel makes Images as
Components, but does
not make them draggable. Icon extends this class.
-
ImageButton.java. Makes a button holding an
image. Generates action events in the same way as the
regular Button class.
-
IconTest.java. An applet that does a simple test of
the Icon class. Can be run either standalone or in
a Web browser.
For more examples, see the
Core Web Programming source code archive.
7/96 Marty Hall. hall@apl.jhu.edu