public void mousePressed(MouseEvent e) {
		// where is the mouse pressed ?
		Point p = e.getPoint();

		this.pressedIcon = null; // reset the pressed state

		int targetTab = findTabAt(p);
		if(targetTab != - 1) {
			Icon icon = tabbedPane.getIconAt(targetTab);
			if(icon instanceof JTabbedPaneSmartIcon) {
				JTabbedPaneSmartIcon smartIcon = (JTabbedPaneSmartIcon) icon;
				// convert point into smartIcon coordinates

				// get the tab bounds
				Rectangle r = tabbedPane.getBoundsAt(targetTab);
				if (r == null) {
					return;
				}

				// as the icon is the only thing visible, we consider it centered in the tab
				// (which is the default paint behaviour of BasicTabbedPaneUI, and should be okay
				// with most look and feels.
				int x = p.x - (r.x + r.width / 2 - icon.getIconWidth() / 2);
				int y = p.y - (r.y + r.height / 2 - icon.getIconHeight() / 2);
				if(x >= 0 && y >= 0 && x < icon.getIconWidth() && y < icon.getIconHeight()) {
					// forward the event to the smart icon
					MouseEvent eSmart = new MouseEvent((Component) e.getSource(), e.getID(), e.getWhen(), e.getModifiers(), x, y, e.getClickCount(), e.isPopupTrigger(), e.getButton());
					if(smartIcon.onMousePressed(eSmart)) {
						tabbedPane.repaint(r.x, r.y, r.width, r.height); // no choice but trigger a repaint          
					}
					pressedIcon = smartIcon;
					pressedTab = targetTab;
				}
			}
		}
	}