• 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
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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!
 
Water! People swim in water! Even tiny ads swim in water:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!