With the release of SwingX 1.6.1, we now have a milestone release that contains the PromptSupport code.  So, what are prompts?  They are decorations to empty text components that usually provide a clue on how to use the component.  Search fields containing a "Search" prompt, etc.  Here, I provide a couple of examples on how to use the new SwingX code as well as a runnable application below.

PromptSupport has a rather small API of only 13 methods; most of which are not needed on a daily basis.  There are two entry points for PromptSupport: setPrompt andsetBackgroudPainter.  Unless one of these is called no prompt painting will be performed.  Let's discuss each of the configurable prompts options and their defaults.

Focus Behavior
This is how the prompt reacts when the prompted component gains and looses focus.
HIDE,which hides the prompt when the component gains focus. This is the default behavior.
SHOW,which shows the prompt until the user types something.
HIGHLIGHT,which highlights the prompt text as though it were auto-selected.
Font Style
Alters the font by making it bold, Italic, orbold Italic. The default is to show the font unchanged.
Foreground Color
This is the color of the text prompt. The default is to use JTextComponent.getDisabledTextColor().
Background Color
This is the background color of the text prompt. By default this is the same color the text component normally uses.
This is the text displayed for the prompt. This or a background painter is required.
Background Painter
A painter that overlays the background, but lies beneath the prompt text. The painter allows non-text prompts, gradient backgrounds, or whatever you can imagine. This or prompt is required.

A simple example, using just the defaults:
JTextField tf = new JTextField(5);
PromptSupport.setPrompt("A Prompt", tf);

Specifying a prompt with foreground and background colors:
JTextField tf = new JTextField(5);
PromptSupport.init("Custom Prompt Colors", Color.GREEN, Color.BLACK, tf);

More examples are available in the Webstart demo.  The source is available here.  As always, please provide comments and feedback on our forums and any issues to our tracker.