This week's book giveaway is in the Android forum.
We're giving away four copies of Learning Java by Building Android Games and have Jean-Marcel Belmont on-line!
See this thread for details.
Win a copy of Learning Java by Building Android Games this week in the Android forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Customising JToolTip / using JFrame?  RSS feed

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have a Java Application and I want to create a tooltip similar to what you see on some windows applications when you click on a link. It looks like a tooltip but the box doesn't go away until you click on an area outside it or if you press the x button in the top right corner.

Can someone put me in the right direction please? I had a look into Tooltips but couldn't see anything other than changing the background / foreground and multiline tips.
Should I use a JFrame and have a mouselistener on the application?
How do I make it look more like a tooltip than a Frame? i.e. remove the title bar and the minimise / maximise buttons?

all suggestions appreciated!

thanks!
Trisg
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only other thing I can think of is a JPanel. You might want to start there. I am not sure what your trying to do with the whole tool tip thing, but the JPanel is a blank panel with no min, max, or close buttons. Also, i am not sure if you know this but all the extend classes of JComponent have a setToolTip() method, which is probably a lot eaiser than writing one yourself.
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
two suggestions:

(1) have you looked at Sun's JavaHelp? I haven't used it, it looks involved, but might work if you need a heavy-duty/long-term solution.

(2) Daniel Brookshier wrote an interesting approach to "Building a Status-Bar Help Bean". It's interesting reading even if you don't go that route. The design could be adapted for another component like a Dialog...

Good Luck!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!