@Override public void mouseEntered(MouseEvent evt) { evt.getComponent().setCursor(new Cursor(Cursor.HAND_CURSOR)); if (container.getSelectedItem() == null || item != container.getSelectedItem()) { item.setBackground(Color.YELLOW); } item.getNameLabel().setForeground(Color.red); item.getYearLabel().setForeground(Color.red); }
@Override public void mouseExited(MouseEvent evt) { evt.getComponent().setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); if (container.getSelectedItem() == null || item != container.getSelectedItem()) { item.setBackground(container.getStyleCache().get(item.getXGUI_Item().getKey())); } item.getNameLabel().setForeground(Color.black); item.getYearLabel().setForeground(Color.black); }