Re: MouseListener doesn't react in JLabel

From: Andreas Schmidt (schmidt.2002_at_gmx.de)
Date: 11/25/03


Date: Tue, 25 Nov 2003 15:14:12 -0500

On Tue, 25 Nov 2003 17:08:09 +0100, Kleopatra <fastegal@gmx.de> wrote:

> Andreas Schmidt wrote:
>>
>> the problem is another annoying Swing bug:
>> my JLabel had a tooltip. therefore, it does not receive events!
>>
>> Java Bug #4413412: Mouse Events intercepted by Tooltip
>> http://developer.java.sun.com/developer/bugParade/bugs/4413412.html
>
> Assuming you really need to get the mouseEvents below a visible child, a
> way out might be to not register the label with the ToolTipManager but
> the panel - which then should ask it's children for a toolTip at the
> mouse position (have a look at JTable it does something similar when
> trying to check the renderers' tooltip)

That sounds good, I will look at it.

It would be the same workaround I am trying for a popup menu that is
usually called from a tiny small component (20, 10), but does not receive
the focus because it has itself wider Dimensions than the small component
that calls it. So, I call the popup from within a bigger parent container.
(see
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&threadm=opryuw8egfk05e3a%40News.CIS.DFN.DE&rnum=1)

Thanks, Andi



Relevant Pages

  • Re: MouseListener doesnt react in JLabel
    ... > my JLabel had a tooltip. ... > Java Bug #4413412: ... interprets a visible child at the point of the mouseEvent as transparent ... to mouseEvents as long as it does not have mouseEvents enabled, ...
    (comp.lang.java.gui)
  • Re: tooltip / popups
    ... From your description you need a tooltip with a button in it, ... I would suggest you use the HoverMenu control. ... Microsoft Online Support ... | I am trying to create a tooltip popup - where the popup will allow you ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: tooltip / popups
    ... Microsoft Online Support ... |> From your description you need a tooltip with a button in it, ... |> | Kind of like the popup on the foodnetwork website ... Once the panel without the grid is collapsed every popup is offset and not ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Raising Tips Pop-Up Event on GotFocus ?
    ... For your info that I am using tooltip object and add it to two of my ... I'd like those two controls will raise the popup ... I know the got focus event, but what i need to do ...
    (microsoft.public.dotnet.languages.vb)
  • Re: NotifyIcon
    ... Veign's Resource Center ... Veign's Blog ... How can I force a popup for the tooltip in a notifyIcon in VB6; ...
    (comp.lang.basic.visual.database)