• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

How to Implement "MicroHelp"?

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you say about some tool tips ?
:-)
 
marc bowden
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ana
No, tooltips aren't appropriate as some of the help text will
be 10-15 words.
Marc
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...

HTH,
-Nate
 
Author
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use tooltips, but change the tool tip renderer to display in the status line.
------------------
John Zukowski Author of "Definitive Guide to Swing for Java 2" and "Java Collections"
 
marc bowden
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Hey! You're stepping on my hand! Help me tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic