Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1233

How can JComboBox listene

From "RC" <rc@THRWHITE.remove-dii-this>
Subject How can JComboBox listene
Message-ID <etms18$efe$1@news.nems.noaa.gov> (permalink)
Newsgroups comp.lang.java.gui
Date 2011-04-27 15:32 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui,comp.l

Since JComboBox and JButton both are
extends from JComponent.
When I addMouseListener(this);
for jButton, it listens to the MouseEvent.
But jComboBox doesn't listen to the MouseEvent.

public void mouseEntered(MouseEvent me) {
	System.out.println("mouse entered");
         jComboBox.setToolTipText("mouse entered"); // not work
         jButton.setToolTipText("mouse entered button"); // works fine
}

mouseEntered just move your mouse pointer on
the object, no need to click (pressed and released).

I just want to detect the mouse entered on JComboBox
(i.e. popup a ToolTip) before I click it for select an item.

Do I miss something? Do I need to setXXX and/or enableXXX
JComboBox before I addMouseListener?

Thank Q for your help!

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextNext in thread | Find similar | Unroll thread


Thread

How can JComboBox listene "RC" <rc@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
  Re: How can JComboBox lis "Tom Hawtin" <tom.hawtin@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
  Re: How can JComboBox lis phillip.s.powell@gmail.co.remove-dii-this - 2011-04-27 15:32 +0000

csiph-web