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.

 Avaya DevConnect Center
 Service Component Architecture/Service Data Objects Solution Center
 Intel Go Parallel Portal
 Internet.com eBook Library
 IBM Software Construction Toolbox
 Microsoft RIA Development Center
 Destination .NET
XML error: not well-formed (invalid token) at line 53
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%.

Windows 7: It's Not Just a Codename Anymore
Microsoft Shines Silverlight on Eclipse
OpenOffice Hits 3.0: Can It Challenge Microsoft?
Get Ready for Microsoft's 'Oslo' Modeling Tool
Latest Linux Hits Networking Flaws
Metasploit 3.2 Offers More 'Evil Deeds'
'Thank You Apple. Seriously.'
The Buzz: BlackBerry App Store Seen Next
Is .NET on Linux Finally Ready?
Red Hat Takes on HPC Market, Microsoft

Intel Sees Fewer Power Cords in Your Future
F# 101
Use Explicit Conversion Functions to Avert Reckless Implicit Conversions
Polyglot Programming: Building Solutions by Composing Languages
Automated testing for .NET by Ben Hall
"Supply Chain" SOA with SKOS
Service Component Architecture in Real Life
C++Ox: The Dawning of a New Standard
Getting Started with Virtualization
Master Complex Builds with MSBuild

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

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: BitLocker Encryption on Windows Server 2008
Go Parallel Article: Intel Thread Checker, Meet 20 Million LOC
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Tripwire Whitepaper: Seven Practical Steps to Mitigate Virtualization Security Risks
Internet.com eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES