if (! (releasedComponent instanceof JComboBox))
if (! bounds.contains(e.getPoint()))
    public void mouseReleased(MouseEvent e)    {      // Get component over which mouse was released      Component src = (Component) e.getSource();      int x = e.getX();      int y = e.getY();      Component releasedComponent = SwingUtilities.getDeepestComponentAt(src,                                                                         x, y);      // if mouse was released inside the bounds of combo box then do nothing,      // Otherwise if mouse was released inside the list of combo box items      // then change selection and close popup      if (! (releasedComponent instanceof JComboBox))        {	  // List model contains the item over which mouse is released,	  // since it is updated every time the mouse is moved over a different	  // item in the list. Now that the mouse is released we need to	  // update model of the combo box as well. 	  	  comboBox.setSelectedIndex(list.getSelectedIndex());	  if (isAutoScrolling)	    stopAutoScrolling();	  hide();        }    }