Java Applets



Well, right now all I have is this one text scroller which can be seen on the bottom of this screen. There are still alot of things I have to do to make it complete, like make a smoother transition when changing the text on the fly.

Below are all the parameters that can be passed to the applet:

TEXT The text to be displayed on the scroller. This is just the initial text value since it can be changed at any given time.
FONT The name of the font to be displayed. The default value is Arial
FONTSIZE The size of the font to be displayed.. Default is 12.
FONTSTYLE Default is BOLD. Options are Plain, Bold, and Italic.
DELAY Delay for the thread sleep call. Default is 50.
DIST How far the text should increment on each paint call. Default is 5
FGCOLOR The text color. Default value is blue.
BGCOLOR The background color if there is no image. Default is white.
BACKGROUND The background image.
IMGWIDTH The width of the background image if there is one. If the image is supplied, but this value isn't, the image will not be displayed correctly.
IMGHEIGHT The width of the background image if there is one. If the image is supplied, but this value isn't, the image will not be displayed correctly.
DROPSHADOW This is simply a 1 or 0. 1 means have a drop shadow, 0 means none. Default is 0.
SHADOWCOLOR The color for the drop shadow. Default is black.
XOFFSET The X off set for the drop shadow. Default is 2.
YOFFSET The Y offset for the drop shadow. Default is 2.
PADDING This in an integer of how many spaces to use for the padding. Default is 15.



To use this applet, simply download it below and insert an applet tag like the one below into your page:


<APPLET code="TransScroller.class" height=20 width=200>
   <parameter name=TEXT value="This is some text">
   If you had a java enabled browser you would see a java scroller here.
</APPLET>
Of course that is the absolute bare minimum. To add any of the other parameters, simply use the parameter, name= and value= format. If you can think of any other features you would like to see added, let me know.

For on the fly text changing and color changing you need to use JavaScript and include something like the code snippet below:


<Script language="JavaScript">
   function changeText(text) {
	document.AppletName.changeText(text);
   }
</Script>
and in the applet tag, add a name definition, as in:

<applet code="TransScroller.class" name="TransScroller" height=20 width=200>
...
</applet>
For on the fly color changing, again you need to use JavaScript:

<Script language="JavaScript">
   function changeColor(color) {
	document.AppletName.changeColor(color);
   }
</Script>




I like to know who's using my applets, so just fill out this simple form here and you can download the scroller applet.

Name:  
Email: 
URL:   

Would you like to be notified by email when any new versions of this applet come out?
Yes
No





Right now I'm not working on anything else because I'm all out of ideas for my simle page here. If you have anything you might like me to write, let me know about it and I'll see what I can do.


Back to main



As seen on...


Last Updated - November 12th, 1996
With comments, suggestions etc, contact shallib@uclink4.berkeley.edu
Nothing on this page or any pages attached to it may be copied or used elsewhere without express written permission from me, if you ask I probably won't have a problem with it, but ask FIRST!



Internet Link Exchange
Member of the Internet Link Exchange Free Home Pages at GeoCities