public void mouseExited(MouseEvent e) { Object source = e.getSource(); if (!(source instanceof JLabel)) return; if (!tokenMode && !correctionTokenMode) { // tile mode HexLabel tile = (HexLabel) e.getSource(); tile.setToolTipText(null); } }
public void mouseEntered(MouseEvent e) { Object source = e.getSource(); if (!(source instanceof JLabel)) return; if (!tokenMode && !correctionTokenMode) { // tile mode HexLabel tile = (HexLabel) e.getSource(); String tooltip = tile.getToolTip(); if (tooltip != "") { tile.setToolTipText(tooltip); } } }