Search code examples
javaswingclickjbutton

Is it Possible to Remove the Shadow on a JButton Icon?


My questing is pretty much already asked in the title. When you click a (Java Swing) JButton you get a type of hover effect or a "shadow" over the icon of the JButton. Is it possible to remove this shadow to make the button icon appear in the same way as it does when not clicked?

Thanks in advance!


Solution

  • You could call setRolloverIcon with the result of getIcon.