MouseListener doesn't react in JLabel

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


Date: Sun, 23 Nov 2003 19:00:23 +0100

I have a JComponent, containing some other Components, including a JLabel.
I added a MouseListener to the JComponent. But it does not react when the
mouse is exaclty over the letters of the JLabel inside. Just when the
mouse is next to the letters, the MouseListener reacts. Does someone know
the problem?

Andi



Relevant Pages

  • Re: MouseListener doesnt react in JLabel
    ... >> I added a MouseListener to the JComponent. ... >> mouse is exaclty over the letters of the JLabel inside. ... >> mouse is next to the letters, the MouseListener reacts. ... Mouse Events intercepted by Tooltip ...
    (comp.lang.java.gui)
  • Re: Adding MouseListener to an Object
    ... You need not implement MouseListener in any named class if you don't want to. ... There is no requirement that your MouseListener implementation extend a JComponent. ... What you do need is to make sure that once you've got a MouseListener implementation, you actually add it to a component via an addMouseListenermethod. ... Vector of tile) and then determine which tile it was that the ...
    (comp.lang.java.programmer)
  • Re: Adding MouseListener to an Object
    ... You need not implement MouseListener in any named class if you don't want to. ... There is no requirement that your MouseListener implementation extend a JComponent. ... What you do need is to make sure that once you've got a MouseListener implementation, you actually add it to a component via an addMouseListenermethod. ... Vector of tile) and then determine which tile it was that the ...
    (comp.lang.java.programmer)
  • Re: MouseListener doesnt react in JLabel
    ... > I have a JComponent, containing some other Components, including a JLabel. ... > mouse is exaclty over the letters of the JLabel inside. ... > mouse is next to the letters, the MouseListener reacts. ...
    (comp.lang.java.gui)
  • Re: Posted again : Pb with paint() ...
    ... | - I put a MouseListener on the JLabel: ... window flashes gray. ... Andrew Thompson ...
    (comp.lang.java.gui)