Hi In a swing frontend, each time a user enters a visual component - eg a jtextfield - I would like to display a help line at the bottom of the pane/frame/applet or whatever. Can anyone suggest a good way of doing this. At the moment I am thinking of each inheriting from their component type and building in a listener which thru a focus gain event will set the help text within the component. I am not sure how to set it, in a generic way, in the visible help line. Any better ideas, please? Marc
If you want to do it the way you described, the easiest thing to do would be to make a mouse listener, and test if the mouse was over a specified component, and then set the text in a textbox in the bottom of the screen or whereever.
Another suggestion is to still use tooltips, but only enable them if the user has a "Help" button depressed on the toolbar or something... I have seen other programs that do context sensetive help this way...
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
John Zukowski Author of <a href="http://www.amazon.com/exec/obidos/ASIN/189311578X/ref=ase_electricporkchop/107-7882751-0234939" target="_blank" rel="nofollow">"Definitive Guide to Swing for Java 2"</a>,<br /><a href="http://www.amazon.com/exec/obidos/ASIN/1893115925/ref%3Dase%5Felectricporkchop/102-5437230-7785719" target="_blank" rel="nofollow">"Java Collections"</a> and <a href="http://www.amazon.com/exec/obidos/ASIN/1893115984/ref%3Dase%5Felectricporkchop/102-5437230-7785719" target="_blank" rel="nofollow">"Learn Java with JBuilder 6"</a>
Joined: May 10, 2001
Originally posted by John Zukowski: Use tooltips, but change the tool tip renderer to display in the status line.
Hi John Thanks. Could you tell me how to do this please? Marc