I have some code for a JButton:
solutionButton = new JButton("Solution");
solutionButton.setBorderPainted( false);
solutionButton.setContentAreaFilled( false );
solutionButton.setFocusPainted( false);
solutionButton.setFont( new Font("Arial",Font.BOLD,16));
solutionButton.setForeground( new Color(80,21,25));
solutionButton.setRolloverIcon(
new ImageIcon(getClass().getResource( "images/game.png")));
solutionButton.setRolloverEnabled( true );
add(solutionButton);
If I simply setIcon, it works fine, I see the icon. If I do the above and try to set a rollover icon, I do not see any icon when I mouseover the button.
What am I doing wrong?
Thanks