Skip to content

Instantly share code, notes, and snippets.

@sudar
Created September 17, 2010 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sudar/584199 to your computer and use it in GitHub Desktop.
Save sudar/584199 to your computer and use it in GitHub Desktop.
MouseAdapter handler = new MouseAdapter() {
//Override methods
}
// Get all children of the combobox
Component c[] = combobox.getComponents();
for (int i =0; i < c.length; i++) {
// add event listener to all of the child components
c[i].addMouseListener(handler);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment