> in my component I want to display dynamic tooltips, i.e. a different tooltip
> is displayed each time you hover over the component.
Override getToolTipText(MouseEvent)
> I overrode createToolTip() with the following method but the String "TEST"
> is never displayed...instead it always shows "HALLO" although the method
> createToolTip() is called (I tested with the debugger).
The ToolTipManager (naturally) calls setTipText again with the value of
your component's getToolTipText.
Christian

Signature
And in short, I was afraid.
Rene Ruppert - 01 Dec 2003 08:05 GMT
Hallo,
> Override getToolTipText(MouseEvent)
[...]
> The ToolTipManager (naturally) calls setTipText again with the value of
> your component's getToolTipText.
It worked. But what is createToolTip() good for anyway if you don't need to
override it?
When considering the help docs they say that overriding this method is the
correct way to display "your own tooltip".
cu
Rene
Christian Kaufhold - 03 Dec 2003 14:28 GMT
> Hallo,
>
[quoted text clipped - 5 lines]
> It worked. But what is createToolTip() good for anyway if you don't need to
> override it?
I don't think the question make much sense this way.
It is used by the ToolTipManager to create the Tooltip.
> When considering the help docs they say that overriding this method is the
> correct way to display "your own tooltip".
your own tooltip != your own tooltip-text
Christian

Signature
And in short, I was afraid.