advertisement
javaboutique
Search Tips
Articles  |   Tutorials  |   Reviews  |   Tools  |   by Category  |   by Date  |   by Name  |   Submit  |   Source  |   Forums  |  
javaboutique
Browse DevX


Partners & Affiliates











advertisement

Fader


This applet will show a list of strings scrolling and fading between them. Everything is done automaticaly : you select the height and the width of the applet and all accomodations will take place. You can put a link, even using targets, to your text and highlight it when your mouse moves over the applet.

Applet Parameters

   PARAMETER NAME    PARAMETER VALUE
 DELAY This is the delay in milliseconds between redraws. In other words it represents the speed of the scrolling. To make your animation more fluid you should decrease the time. The default value is set to 40 ms.

 STOP This is the time, in milliseconds, the text should be waiting before scrolling again. The default value is set to 1000 ms (1 second). If you intend to link the text to some URL you should set this value to a reasonable time for the user to click on the text.

 BGCOLOR This will set the background color of the applet. Use the same hexadecimal code that you are using in your html source. The default value is set to white. Don't use this parameter if your page is white so the background of the applet can match the page color.

 FGCOLOR This will set the color of the letters. Here again use hexadecimal color codes. If you don't specify any value the default is set to 0000CC which is blue like the example on top.

 HIGHLIGHT This parameter will change the color of the letters to the specified color when your mouse moves over the applet. This will only occur if there's an associated URL for the current text. You must use hexadecimal colors. The default value is set to red (FF0000).

 FONTNAME This will specify the font used to display the text. You may choose between many fonts. for example there is arial, dialog, helvetica, courier, etc... The default value is set to TimesRoman.

 FONTSIZE This will specify the font size of the displayed letters. This depends alot on the font you are using. The default value for this parameter is set to 24.

 FONTSTYLE Use 0 for PLAIN, 1 for BOLD, 2 for /ITALIC or 3 for ITALIC BOLD to set the style of the display. The default value is set to PLAIN.

 TEXT# This is the list of all strings to be shown. You must specify an order that's why you must replace the # with a number. You must start at 0 and increase by 1 at each time so be carefull.

 URL# This will link the user to the associated URL when he clicks on the text. If no URL is specified there will be no linking. Be carefull to replace the # with the correct number to associate the text with the corresponding URL. You must start at 0 and increase by 1.

 TARGET# Sometimes you want the URL to be opened in a particular frame or in a completly different window. Use this parameter to specify the destination of the URL to open. Replace the # with the correct number to associate the target with the corresponding URL.

As an example here's the code we used for the applet on top :

<applet code=Fader.class width=300 height=90>
        <param name="delay" value="20">
        <param name="stop" value="2000">
        <param name="fontSize" value="26">
        <param name="fontStyle" value="1">
        <param name="fontName" value="Courier">
        <param name="text0" value="WWW.ALTAVISTA.COM">
        <param name="text1" value="WWW.YAHOO.COM">
        <param name="text2" value="WWW.HOTBOT.COM">
        <param name="text3" value="WWW.JAVASOFT.COM">
        <param name="url0" value="http://www.altavista.com">
        <param name="url1" value="http://www.yahoo.com">
</applet>
Here's the detailled explication just in case you still don't understand :
   PARAMETER NAME    PARAMETER VALUE
 DELAY We want the scrolling to go a little faster than usual so we set it to 20 ms.
 STOP We want to give the user some time to analyse so we stop the text for 2000 ms.
 BGCOLOR No color specified so the background will be the default color white.
 FGCOLOR Nothing specified so the default is set to blue.
 HIGHLIGHT Will highlight text linked to a URL on mouse over with default color red.
 FONTNAME Font courier is beeing used.
 FONTSIZE We are using a font size of 26 points.
 FONTSTYLE Our font is kind of small so we just set it to bold (1).
 TEXT0 The first text to show while scrolling : "WWW.ALTAVISTA.COM"
 TEXT1 The second text to show : "WWW.YAHOO.COM"
 TEXT2 The third : "WWW.HOTBOT.COM"
 TEXT3 The last one : "WWW.JAVASOFT.COM".
 URL0 The URL to be associated with text0 : "http://www.altavista.com"
 URL1 The URL to be associated with text1 : "http://www.yahoo.com"
 TARGET# No target used so any link will open in the same location they are.

For any comments or suggestions you can contact me at bad@step.polymtl.ca
Alessandro Veneziano

Back to Fader

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.

 Internet.com eBook Library
 IBM Software Construction Toolbox
 Microsoft RIA Development Center
 Destination .NET
XML error: not well-formed (invalid token) at line 38
advertisement
Receive Articles via our XML/RSS feed
Receive Articles via our XML/RSS feed

JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for Windows 95, 98, ME, NT, 2000 and XP. It's designed to automatically optimize your Windows settings, boosting your Internet connection up to 200%.

Microsoft's Novell Investment Tops $340M
Fedora 10 Takes Shape
IBM Gives a Mobile Voice to Developers
Inadequate Tools Send Software Down the Drain
USB 3.0 One Step Closer to Reality
Would-Be Linux Contributors May Get a Leg Up
SAP, Oracle Holding Out on Ubuntu?
GIPS Technology to Voice-Enable iPhone Apps
Citrix CTO Eyes the Future of Virtualization
The Pitfalls of Open Source Litigation

DevXtra Editors' Blog: Executives Avoiding Cloud Computing in Droves
Q&A with James Reinders on the Intel Parallel Studio Beta Program
The Pros and Cons of Outsourcing Enterprise Emails
Hosting Options: Shared or Dedicated Server
Movin' On Up: How to Hop to a New Host
Simplifying Composite Applications with Service Component Architecture
The Guide to E-Mail Archiving and Management
Making XQuery Control Structures Work for You
Overview: C++ Gets an Overhaul
Sharpening Your Axis with Visual Basic 9

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers