Here you can find the source of addClickTipEffect(final JComponent component)
public static void addClickTipEffect(final JComponent component)
//package com.java2s; //License from project: Apache License import java.awt.event.MouseEvent; import javax.swing.JComponent; public class Main { public static void addClickTipEffect(final JComponent component) { component.setForeground(new java.awt.Color(51, 51, 255)); component//ww w . ja v a 2 s .c o m .setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); component.addMouseListener(new java.awt.event.MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { component.setOpaque(true); component.setBackground(new java.awt.Color(51, 51, 255)); component.setForeground(new java.awt.Color(255, 255, 255)); } @Override public void mouseExited(MouseEvent e) { component.setOpaque(false); component.setBackground(new java.awt.Color(255, 255, 255)); component.setForeground(new java.awt.Color(51, 51, 255)); } }); } }