This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Mouse Listener on JComboBox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Mouse Listener on JComboBox" Watch "Mouse Listener on JComboBox" New topic
Author

Mouse Listener on JComboBox

Sajee Joseph
Ranch Hand

Joined: Jan 17, 2001
Posts: 200
Hi,
I need to implement a mouse listener on the JList part of JCombo box. As i have read, Swing's implementation of a ComboBox --is a combination of a text field and drop-down list .
So when i do
Component[] comps = c.getComponents();
for(int i = 0; i < comps.length; i++)
{
comps[i].addMouseListener(this);
}
The mouse listents to mouse events on the combo. But instead i want the mouse events(like double click) on the list that appears below the JCombo , and not on the JCombo.
How do i do that?
Regards
Saj
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mouse Listener on JComboBox
 
Similar Threads
Do MouseEvents work on JComboBox
Jcombo box
JCombo+JList problem
Adding addPopupMenuListener to JCombo Box through Mouse Event
JCOMBO Box traversal problem