FontShower For AWT : Java Glossary
home F words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
Go to : punctuation 0-9 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 (all)
FontShower for AWT
This Applet will help you write Java code. It will show you what AWT fonts are available via Java on your machine, and what they look like in a variety of styles, sizes and colours.

Click any ball to view the corresponding colour palette.

Named Colours button Alphabetically (113) button BHS: by Brightness, Hue, Saturation button HBS: by Hue, Brightness, Saturation button SBH: by Saturation, Brightness, Hue button Java AWT Colours (16,777,216)
button RGB: Numerically (113) button BSH: by Brightness, Saturation, Hue button HSB: by Hue, Saturation, Brightness button SHB: by Saturation, Hue, Brightness button Java Swing Colours (16,777,216)
Numbered Colours button HTML 3.2 (16) button Websafe (216) button Rainbow (4096) button Spectrum (401) button X11 (657)
Selected Colours button Pale (256) button Dark (2022) button Simple (105) button Greys (256) button Colour Schemes
This Applet will let you generate foreground and background colours from a palette of any of 16,777,216 numbered colours. This range of colour/color possibilities is known as the gamut. Use the FontShower for Swing Applet to see what you can do in Swing. Use the Unicode Applet if you want to view the entire Unicode character set.

If the above Font Shower for AWT Java Applet (that can also be run as an application) does not work…

  1. This Java Applet (that can also be run as an application) needs Java 1.2 or later, ideally version 1.6.0_06 and a recent browser.
  2. You should see an Applet above looking much like the screenshot. If you don’t, the following should help you get it working:
  3. If you are using Microsoft Internet Explorer, try another browser. Seriously. Microsoft has taken great pains, over and over, to screw up Java and every other mult-platform standardisation.
  4. If you are using Internet Explorer 7, you must allow blocked content permission for Active X to run. This also gives permission to Java to run. Click the Information bar, and then click Allow blocked content. Unfortunately, this also allows dangerous ActiveX code to run. However, you must do this in order to get access to perfectly-safe Java Applets running in a sandbox. This is part of Microsoft’s war on Java. Don’t put up with it! Use a different browser.
  5. To ensure your Java is up to date, check with Wassup.
  6. If the above Java Applet (that can also be run as an application) does not work, check the Java console for error messages.
  7. If the above Applet hybrid does not work, you might have better luck with the downloadable version.
  8. If you still can’t get the program working click HELP for more detail.
  9. If you can’t get the program working after trying the advice above and from the HELP button below, have bugs to report or ideas to improve the program or its documentation, please send me an email atemail Roedy Green.
Java powered   Get New Java  Get New Browser   Help
FontShowerAwt is displaying the AWT fonts available on your machine via Java. Other people will have different fonts installed and will see different selections available via Java on their machines. Your browser will see a slightly different set of fonts than this Java Applet does. Java has a few extra private fonts, and some browser fonts don’t work with Java.

Unfortunately, in AWT, only the basic logical fonts: Dialog, DialogInput, Monospaced, SansSerif, and Serif are available for use in Labels, TextFields and TextAreas. To get other fonts shown here, you must write a custom component based on Canvas and drawString.

The Canvas displays were done with a custom AWT Canvas-based component. This lets you use all the fonts and all the characters in the fonts. The source code is available.

The alternate vanilla AWT TextArea display is based on a native OS peer (as are as Label and TextField). It can only display the 5 basic logical fonts and then only some of the characters in those fonts. You have no control in Java over whether TextAreas are anti-aliased. They are rendered by the OS, not Java, and hence are controlled by whether font smoothing is turned on in the Control Panel.

You may not notice any difference with font-smoothing anti-aliasing. Look for the anti-alias smoothing especially in very large font sizes in capital W in the fonts with thin spidery diagonals, e.g. Bodoni, Book Antiqua, Garamond, Serif and Zapf Calligraphic.

Some of the fonts may just show empty squares. These are older 8-bit fonts that don’t support 16-bit Unicode used by Java. Don’t necessarily delete them ( by clicking Control Panel ⇒ fonts ⇒ delete) since word processing documents, or the DOS box, may still be using them. on the other hand, pruning out ugly fonts you never use will speed up your machine.

details about the current version. download source and executable to run this Applet on your own machine as a stand-alone application.


CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.18] Spread the Net
You are visitor number 7,164.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/fontshowerawt.html J:\mindprod\jgloss\fontshowerawt.html