Java Virtal

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

   123 4

[ Archives News
for 'Java Technology' ]

home > news > java technology > swingx: using promptsupport

SwingX: Using PromptSupport

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 and setBackgroudPainter.  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, or bold 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 i...

Date: July, 15 2010

Others News

© website maker | website designer | Mobirise Themes | | best web design software