I've since been told that the Tooltips don't actually work on the
parent JPanels, which is why the methods for the internal elements
were proposed...

I'll give your suggestion a try after Xmas.

S.
On 21/12/06, Martin van den Bemt <[EMAIL PROTECTED]> wrote:
I seem to have a really sharp eye these days.. Sigh :) Anyway if your
tooltips are not working (eg
in a JTree) this is the way to go :)
Latest just added for search engines ;)

Mvgr,
Martin

sebb wrote:
> Thanks Martin - but we aren't having a problem with the ToolTip :-)
>
> The classes in question are JMeter classes that extend JPanel, and
> have _private_ gui elements such as TextField and TextArea.
>
> The patch proposes to add set/get ToolTip methods for these. However
> using the same name overrides the ToolTip methods for the superclass.
>
> S.
> On 20/12/06, Martin van den Bemt <[EMAIL PROTECTED]> wrote:
>> Hi Sebb,
>>
>> I don't know the code, the reason I didn't respond before :)
>> The problem is a known issue (with a number of components) and is
>> solved like this :
>>
>>     public Point getToolTipLocation(MouseEvent event) {
>>       if (getToolTipText(event) == null) {
>>         Point point = new Point(event.getX(), event.getY());
>>         return point;
>>       }
>>       return super.getToolTipLocation(event);
>>     }
>>
>> Which is just needed when no tooltip seems to work (= override from
>> JComponent btw).
>>
>> Hope this is useful.
>>
>> Mvgr,
>> Martin
>>
>> sebb wrote:
>> > I added the abstract methods to the interface, expecting the
>> > implementing classes to generate an error - but they did not.
>> >
>> > This is because the classes extend JPanel, which already has the
>> > [gs]etToolTipText methods.
>> >
>> > So adding them to the components will override the JPanel method(),
>> > which means that the JPanel ToolTips will no longer be accesssible.
>> >
>> > I've not looked into it, but surely one might sometimes want to set
>> > the Tooltip on the panel rather than on the internal element? If so, I
>> > think a new method name is needed.
>> >
>> > Equally, is it necessary to be able to set the ToolTip on the private
>> > part of the panel, rather than just setting it on the JPanel?
>> >
>> > S.
>> > On 19/12/06, Fabian Bieker <[EMAIL PROTECTED]> wrote:
>> >> sebb wrote:
>> >> > What I meant was: should the interface JLabeledField define the
>> >> > tool-tip methods?
>> >> yes, that's a good idea.
>> >>
>> >> > Might make it easier to write generic code for setting the
>> tool-tips.
>> >> >
>> >> > I'll probably add it anyway (no need to update the patch).
>> >> great.
>> >>
>> >> --
>> >> Fabian Bieker, QA
>> >> Netzwert AG, An den Treptowers 1, 12435 Berlin, Germany
>> >> Voice: +49.30.5900800-0 Fax: +49.30.5900800-700
>> >> http://www.netzwert.ag
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to