You can try to make your homepage visitors go to pieces with this applet. Applet simply draw normal underlined blue textlink on screen but when user move mouse over that link, it will soon warp to another place, away from the mouse pointer. Of course, if user manage to click mouse button before link moves away, then it works like normal link and opens defined url.

Of course link have to stay inside applet, so remember to make sure that link have enough moving space by making applet large enough. ("Width"- and "Height"-parameters in "Applet"-tag defines applet size.)


Required parameters
Name Possible values Description
Text String Link text which is displayed on screen and which is avoiding mouse pointer.
Additional parameters
Name Possible values Description
URL Url-address
("http...", "mailto...", ...)
Link location which will be opened when someone manage to click link text. If you don't use URL-parameter, then clicking link text doesn't lead anywhere.
Target Frame or window name
(Html-names "_self", "_parent", "_top" and "_blank" will work also)
Specify where link location will be opened. You can make link location to open to different frame or new window for example.
NoUnderline (Anything) Usually applet underlines 'Text'. Use this parameter if you don't want text to be underlined.
Align "Left" or "Right" Defines link's first location to left or right side of applet.
VAlign "Top" or "Bottom" Defines link's first location to top or bottom of applet.
AppletBgColor Hex RGB-color Applet background color.
TextColor Hex RGB-color Text color. Default color is blue.
FontName String
("Arial", "Serif", "Courier"...)
Name of the font used to print 'Text'. All systems doesn't support all fonts, so it's better to use some common font.
FontSize Number
(Positive integer)
Font size.
Delay Number
(Positive integer)
Defines how many milliseconds applet will wait until link text is moved away from mouse pointer. If you use value 0, it's simply impossible to click link. Value 1000 (=one second) makes it already easy to click link.


Example applet running Example applet HTML-code
Your browser can't run Java! <APPLET CODE="AvoidingLink.class" WIDTH=250 HEIGHT=50>
<PARAM NAME="Text" VALUE="My homepage">
<PARAM NAME="URL" VALUE="http://www.tiikoni.net/">
Your browser can't run Java!


AvoidingLink.class (6.273 bytes)

Back to "Free applets"-page

Back to "Java"-page

www.tiikoni.net/java/free/applets/avoidinglink.php Full page map Copyright © Pasi Laaksonen