★ wanayoo — archive 1999 http://java.webdeveloper.com/ButtonBar/config.htmlNouvelle recherche | Portail wanayoo
Computer Digital Expo


Find a Web Host With:
CGI Access
DB Support
NT Servers
UNIX Servers
Telnet Access

advanced search
Internet News
Internet Investing
IT
Windows Technology
Linux/Open Source
Developer
Interactive Marketing
xSP Resources
Small Business
Wireless Internet
Downloads
Internet Resources
Internet Lists
International
EarthWeb
Career Resources

Search internet.com
Advertise
Corporate Info
Newsletters
E-mail Offers
Be a Commerce Partner
Web Hosting
FREE Credit Report
Tax Consultants
Register Domains
Internet Jobs
Best Deals on PDAs!
Shop Digital Cameras
Build an Online Store
Is Your Credit Bad?
Send a Press Release
FlashKit
Gif.com
HierMenusCentral
JavaBoutique
JavaScript.com
JavaScriptSource
WebDev Jobs
JustSMIL
ScriptSearch
StreamingMediaWorld
Web Hosts
WebDevelopersJournal WDVL
WebDeveloper.com
WebReference.com
XMLFiles.com
CGI
HTML
Java
JavaScript
Web Design and Promotion
Web Site Development
E-mail Address:


Can you receive
HTML e-mail?

Yes   No

Zip Code:


ButtonBar


The applet gets almost all of the information via parameters. The parameters have to be set in the HTML Code, as part of the <applet> tag (To see how to create the HTML code read the HTML code page).

The parameters and their function:

(Parameters marked with a * are required)
 
 

 *  NORMBUTTON This parameter specifies the image file which shall be displayed for buttons in normal condition (not pressed, not highlighted). It has to be a .GIF or a .JPG (.JPEG respectively) file. Remember that filenames on the Internet are case sensitive! The file name has to be written correct, if you mix up lower and upper case it'll cause errors. 
 * HIGHLBUTTON Not all too difficult to guess, is it? The same rules as above apply, only that this parameter specifies the file to be displayed when a button is highlighted (when the mouse is over a button, but the button is not pressed). 
 * PRESSEDBUTTON  It should be obvious...
  SPECNORMBUTTON# You can give a button a different image than the default one with this parameter. It has to have the same size as the default buttons.
  SPECHIGHLBUTTON# Same as SPECNORMBUTTON#, only for highlighted status. 
  SPECPRESSEDBUTTON# Same as SPECNORMBUTTON#, only for highlighted status. 
  BACKGROUNDIMAGE A .GIF or .JPG image which will be displayed underneath the button images. It does not necessarily have to be of the same size as the applet. If it is smaller it will be tiled to fill the entire applet area. 
  MOUSEOVERSOUND The sound which is played when the mouse moves from one button to another. The sounds have to be 8 bit, µlaw, 8000 Hz, one-channel Sun ".au" files.
  PRESSEDSOUND The sound which is played when a button is pressed. The same rules as with "MOUSEOVERSOUND" apply.
  ORIENTATION Default value is vertical. You can make a horizontal buttonbar by setting this parameter to "horizontal". 
  DEFAULTALIGNMENT Defines the text alignments on the buttons. Legal values are: "left" and "right". Not defining this parameter will center the text on the buttons.
  DEFAULTFONTNAME Usually the default font name is "Helvetica" (on PCs running MS Windows this font is called "Arial"). You can change the default name with this parameter, which is more easy than changing the font name for every button manually. For more info on font names see "FONTNAME#". 
  DEFAULTFONTSTYLE Usually the default is "PLAIN". Change the default with this parameter. See "FONTSTYLE#". 
  DEFAULTFONTSIZE "Standard default" is 12. See "FONTSIZE#". 
  DEFAULTFONTCOLOR Default is usually black. 
See also:
  DEFAULTHIGHLFONTCOLOR Usually the buttons don't change their font colors when highlighted. If you want them to do so use this parameter.
See also:
  DEFAULTPRESSEDFONTCOLOR Same as "DEFAULTHIGHLFONTCOLOR", only for pressed state.
See also:
  DEFAULTDESTFRAME If most of the pages have to be displayed in a different frame than the one in which the applet itself is displayed you can specify a default destination frame where all pages will be displayed in. If a single page has to be displayed in a different frame than the default destination frame you have to use the DESTFRAME# parameter. 
  BUTTONSSTAYPRESSED If this parameter is specified the button which was pressed will remain so until another button is pressed. The purpose is to indicate where on a site the viewer is. It doesn't matter which value this parameter has, its pure existence suffices to activate this option.
  STARTBUTTON If the option "BUTTONSTAYPRESSED" is activated button #1 will be in pressed condition after loading. If you want a different button to be pressed after the applet is loaded you can specify its number with this parameter.
  BUTTONALIGNMENT# You can set a different text alignment for each button with this parameter. Legal values are "left" and "right". 
 * BUTTONTEXT# The text to be displayed on the button. Make sure it's not too long, the applet won't check the length. 
 * DESTURL# Same as with the TEXT# parameter, but this time you specify the URL to which you want to link this button. URLs can be relative or absolute, even targets should work fine. 
See also:
  DESTFRAME# You can define a frame in which you want to appear a page a button is linked to. But you don't have to, if you don't specify a destination frame, the page will be loaded in the current frame. 
  STATUSMESSAGE# You can define a short statement which will appear in the status bar of your browser when the mouse arrow is over a button. This statement might be a short description of what the page that's going to appear contains. 
  FONTNAME# Every button can have a different font, the name of which you define with this parameter. Valid values are: 
  • Dialog
  • Helvetica (On machines running MS Windows this is "Arial")
  • TimesRoman (On machines running MS Windows this is "Times New Roman")
  • Courier
  • DialogInput
  • ZapfDingbats
Default is Helvetica. 
  FONTSTYLE# The three valid options are: PLAIN, ITALIC and BOLD. If you skip this parameter the font will be displayed PLAIN. 
  FONTSIZE# Pretty obvious... Of course you can't use all numbers, i.e. a font of the size 100 won't work. Use the font sizes which work also in your word processing tool. Default is 12. 
  FONTCOLOR# If you want a button to have a different font color than the default color for normal status use this parameter. 
See also: 
  HIGHLFONTCOLOR# If you want a button to change its font color when being highlighted use this parameter. 
See also:
  PRESSEDFONTCOLOR# Same as "HIGHLFONTCOLOR#", only for pressed state. 
See also:

How to define colors:

Generally, there are two ways to define a color:

  1. HTML-like: In HTML a color is defined by three hexadecimal numbers between 0 and 255. These numbers represent the RGB values, that is the red, green and blue shares of the color. By defining the RGB values you can mix any color you like. For example, to get a red color like this one you had to define the shares like this: Red = 255, Green = 0, Blue = 0. In hexadecimal numbers this would be: Red = FF, Green = 0, Blue = 0. Thus, to define the color red in HTML you would write "ff0000" (it doesn't matter whether you write the letters upper- or lowercase). Many image processing applications have a feature to convert colors to hexadecimal RGB values. If you do not have such an application yet you might wish to visit www.jasc.com and download the shareware version of "Paint Shop Pro".
  2. Shortcuts: I built in shortcuts for some of the most common colors. The shortcuts are:
    • black (is also default)
    • blue
    • cyan
    • darkgray
    • gray
    • green
    • lightgray
    • magenta
    • orange
    • pink
    • red
    • white
    • yellow
Defining image/audio clip locations and URLs

You can specify URLs in two ways: either you give the applet just a filename or you specify an entire URL. If you use just a filename with no path information, the applet will automatically add the path of the HTML document to create a complete URL.

Example:

If one of your "DestURL#" parameters links to: "buttonbar_mainframe.html", the applet will automatically add the document's path to this. The complete URL (which the applet will use to call the document) will be:

http://welcome.to/javaforall/buttonbar_mainframe.html

(assuming that "http://welcome.to/javaforall" is the URL where the HTML document is residing).

You can also link to pages which are stored in subdirectories. A link to a page which is in a subdirectory called "html_documents" would look like this:

html_documents/buttonbar_mainframe.html

(of course the applet will add the path of the HTML document to this, as it is not a complete URL).

Image locations are different. You cannot use a complete URL to define an image location. The applet will always add the URL of the HTML document into which the applet is embedded to the location. But of course you can also use subdirectories.

Back to ButtonBar


Applet Index
(sorted alphabetically)

A B C D E F G H I J K
L M N O P Q R S T U
V W X Y Z #s
The Java Source
(applets w/source code)

A B C D E F G H I J K
L M N O P Q R S T U
V W X Y Z

How to Add Java Applets to Your Site

New on the Java Boutique:

New Article:
A Barebones Guide to Usability Testing
At first glance, usability testing may seem like unnecessary, or additional work. In todays budget slashed world, it is not uncommon for projects not to have the luxury of this valuable phase. This is a dangerous path to tread. Let's look at how we can incorporate usability testing into our design process.
... [more articles]

New Tutorial:
Java Certification Path API
Certificate based security forms the basis for SSL (Secure socket layer) transactions? Every year billions of transactions involving trillions of dollars are done safely using the SSL protocol. This week we'll look at the role of the Java certification path API and see how it provides a mechanism to implement certification path functionality.
... [more Tutorials]

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.

internet.com logo






Developer News

Will Users Buy a License from SCO to Run Linux?

Linux Community Doubts SCO Claims

Actional Updates Web Services Management Platform



Database Journal Launched!
Jupiter Media has announced the launch of Database Journal. DBJ offers SQL courses and other database related resources for beginner to expert developers.



DB Dude
DB Dude is a JDBC SQL query tool for real database developers who belive that it's still important to code their SQL statements by hand.
Download of the Week
DS PageFlipText
This applet displays a page-flip effect between texts. Over the animation you can also insert an image and a scroll-text.

JB User Poll
Which version of Java do you use the most?
The JavaBoutique Top 15:
1. ChompText
2. PulseText
3. DJPopMenu
4. NavBar
5. PingPong
6. RushHour
7. Chameleon
8. AScroll2
9. Encyclo
10. 3DMaze
11. AnimLetters_anim
12. Viewer
13. AdvPano
14. MatchIt
15. BMI
Want more? Check out our Top 100!

Refer-It
Affiliate Program and Referral Directory.
New on internet.com
Time Warner to Test Microsoft's iTV Software
Trial runs of the company's re-configured interactive guides are seen as a crucial test for Redmond's ambitions to break into television screens, once and for all.

Industry Responsible for Stopping Overseas Outsourcing?
A majority of Americans think the U.S. government and industry should be doing more to keep jobs at home and forgo overseas outsourcing, according to a new study. However, as fewer and fewer college students are studying computer science, the number of U.S. high-tech jobs going to foreign workers will continue to increase.

Big Changes Ahead for Red Hat
Massive changes are coming to a red fedora near you. Red Hat Linux is moving to a more open development model with less focus on boxed sets and more focus on community involvement.


Reports on security issues of ecommerce environments

Jupitermedia is publisher of the internet.com and EarthWeb.com networks.
Copyright 2003 Jupitermedia Corporation All Rights Reserved.

Legal Notices,  Licensing, Reprints, & Permissions,  Privacy Policy.
http://www.earthweb.com/
http://www.internet.com/