fancy buttons : Java Glossary


fancy buttons

There are three places you might use Buttons, in Java, in HTML (Hypertext Markup Language) and in HTML forms.

In all three you can turn any image *.png, *.jpg or *.gif into a button background. Your problem is then finding or generating a button. There are lots of sites on the Web what will generate you glossy buttons in many styles. It is best to make sure you generate all the potential button you will ever need at one sitting. There is no guaranteed that style or even the website will be available in future.

In Java, simply changing the Look & feel can jazz up the buttons. In Java you can make the button change its look when pressed, hovered over, selected, disabled etc.

In CSS (Cascading Style Sheets) you can also use a generic long bar with gradient as your button image background. You just use a piece of it with overlaid bold white type.

Fancy Buttons Done with Extended CSS

There are two main kinds of buttons you use in forms, a button to submit the contents of your form and a button to print the page. Unfortunately I have not yet discovered how to print just the form.

But how can you make your buttons more interesting, like these:

Add the following to your style sheet:

If you want some buttons to look different from the others, apply style classes with <input class=xxx and set up styles to match. The catch is IE (Internet Explorer) and Avant don’t understand the -moz or -webkit properties and ignore the entire style, not just the parts they do not understand. It works fine in Chrome, Firefox, Safari and SeaMonkey. Opera does the colours but not the gradient.

One big advantage of creating your buttons with style sheets is Google Translate can translate the text to foreign languages. It cannot do that for *.png buttons.

This page is posted
on the web at:

Optional Replicator mirror
on local hard disk J:

Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number