Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (767)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (854)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Determining when the tooltip is showing.  (Read 1997 times)
0 Members and 1 Guest are viewing this topic.
Offline zappsweden

Junior Devvie

Java games rock!

« Posted 2006-10-27 19:36:56 »

The ToolTipManager seems very thin to me. Is there any way of knowing when a ToolTip is showing on screen (so that I can suspend certain paints that could ruin the tooltiptext) ?
Offline zappsweden

Junior Devvie

Java games rock!

« Reply #1 - Posted 2006-10-27 19:52:40 »

The only way I find as solution in case there are no methods for finding out when tooltip is showing is that I must have event handlers on every single component I have a tooltiptext on


events on any of those components would set a boolean flag true/false for me to read within the game.
Offline CommanderKeith
« Reply #2 - Posted 2006-10-27 20:17:57 »

A hacky way would be to check the JApplet/JFrame's RootPaneContainer's glassPane which is the component that is the parent of all tooltips.

Check this method out:

& with the glassPane do
glassPane.getCOmponents() & hopefully you'll have all of your visible tooltips!


EDIT: and I nearly forgot, you'd best do that on the event dispatch thread using SwingWorker.invokeLater() or invokeNow().

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline zappsweden

Junior Devvie

Java games rock!

« Reply #3 - Posted 2006-10-28 10:02:31 »

I found a simplke woraround. The problem I got was a tooltip showing as a white rectangle with no text. The reasons was that I was constantly updating my drawing surface so by reducing frame rates I got the tooltip working. The odd thing though, was that the area where I had tooltip was not the same area as where i was repainting due to frame rate and I was actually using passive rendering!

Was not passive rendering supposed to not interfer with other drawing code?
Pages: [1]
  ignore  |  Print  

EgonOlsen (1241 views)
2018-06-10 19:43:48

EgonOlsen (1110 views)
2018-06-10 19:43:44

EgonOlsen (850 views)
2018-06-10 19:43:20

DesertCoockie (1260 views)
2018-05-13 18:23:11

nelsongames (1101 views)
2018-04-24 18:15:36

nelsongames (1330 views)
2018-04-24 18:14:32

ivj94 (2069 views)
2018-03-24 14:47:39

ivj94 (1224 views)
2018-03-24 14:46:31

ivj94 (2156 views)
2018-03-24 14:43:53

Solater (788 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!