void (MouseEvent e) { if (e.getID() == MouseEvent.MOUSE_ENTERED && isOnLink(e.getX())) { myMouseHover = true; repaint(); } else if (e.getID() == MouseEvent.MOUSE_EXITED) { setCursor(null); myMouseHover = false; myMousePressed = false; repaint(); } else if (UIUtil.isActionClick(e, MouseEvent.MOUSE_PRESSED) && isOnLink(e.getX())) { myMousePressed = true; repaint(); } else if (e.getID() == MouseEvent.MOUSE_RELEASED) { if (myMousePressed && isOnLink(e.getX())) { fireHyperlinkEvent(e); } myMousePressed = false; repaint(); } super.processMouseEvent(e); }