I am developing a Swing-GUIed program that needs to run on a
Tablet PC. For a right-handed person using the program, the
default location where tooltips pop-up (below and to the right of
the mouse pointer) is exactly wrong, because the user's hand
(which is holding the pen) will be covering the text. Having
tooltips appear up- and leftwards of the component would be much
more useful.
Now I know that I can affect the location of the tooltip for
individual JComponents by overriding getToolTipLocation(), but I
am not looking forward to having to do that for every JComponent
in my program. What I'm really looking for is a Swing-wide
override of the tooltip-positioning that takes place if you
*don't* override getToolTipLocation(), and thus have Swing choose
a left-and-up location by default for *all* the JComponents in
the program, instead of its current down-and-right choice.
Does anybody here know if something like that is even remotely
feasible, and, if so, how I might go about achieving this effect?
Or if it's not possible, if there is perhaps a less painful way
than overriding getToolTipLocation for everything to do something
similar?
Many thanks in advance,

Signature
Leo Breebaart <leo@lspace.org
Thomas Weidenfeller - 05 Nov 2003 18:28 GMT
> Does anybody here know if something like that is even remotely
> feasible, and, if so, how I might go about achieving this effect?
> Or if it's not possible, if there is perhaps a less painful way
> than overriding getToolTipLocation for everything to do something
> similar?
IIRC the tooltip positioning is hard coded in the ToolTipManager. You
would have to replace the ToolTipManager. I have no idea if this is
possible.
Good luck
/Thomas