public static void main(String[] args) { JLabel label = new JLabel("Hello"); label.setIcon(MenuIcon.getGrayIcon()); JFrame f = new JFrame(); f.setDefaultCloseOperation(EXIT_ON_CLOSE); f.getContentPane().setLayout(new BorderLayout()); f.getContentPane().add(label, NORTH); f.pack(); f.setVisible(true); } }
public MenuButton() { super(MenuIcon.getGrayIcon()); setBackground(null); setBorder(null); setCursor(getPredefinedCursor(HAND_CURSOR)); setRolloverEnabled(true); setRolloverIcon(MenuIcon.getDarkGrayIcon()); } }