Centre for Computational Geography
University of Leeds
This isn't an Applet, it's a class you can use with an
Applet if you're a Java developer. It converts any java.awt.Component
extending class into a Hypertext link which can open in a named
frame or new browser window.
You'll need the class file HyperComponent.class (v1.1) and to
know that it's in the package
Look at the information below to see how to use the class. Currently there are some
problems with using the class in a GridBagLayout. For some reason adding the
HyperComponent fills two cells. If this happens, the solution is to make the
HyperComponent (which will give the starting Component the Mouse-related
behaviour) and then add the original Component to the GridBag rather than
the HyperComponent. The information below will get you started. For more
information, see the docs.
Essential Constructor parameters:
HyperComponent (Component component, URL url, Applet applet)
The java.awt.Component extending class you wish to hyperlink.
A java.net.URL object representing the webpage or cgi program you wish to link to. Note that
A reference to the Applet you make the HyperComponent in. You can pass this
from the Applet to the HyperComponent using "this", i.e.
Optional Constructor parameters:
HyperComponent (Component component, URL url, String target, Color highlight, Applet applet)
Optional. The frame name to connect to. By default this is the "_parent" window - i.e. that which
at the bottom of your applet webpage.
Optional. An optional colour for the component's foreground. This will
replace the standard foreground colour when the mouse is over the component, matching
the stylesheet a:hover behaviour of web links.
This class may be freely used by academic and non-profit, non-governmental organisations,
as well as private individuals. Other organisations should contact the CCG for information on its use.
For further information about this class and the source code, contact
Dr Andy Evans.
[School of Geography homepage]