Problems with JButton with an image on :(

i have a jbutton with an icon and a pressed icon. The problem is that when the button is active the border around the button gets gray and a even lager area gets gray when i press it. :-/ This dosent look good when i have a black background in the game. Does anyone have any tips on how i can make the border black instead of gray? ???
/VeNOM

Does the button size match your image size?

edit: btw I’m just guessing :wink:

if you are using an image as the button and don’t want the JButton to show any of itself, set an emtpy border on the JButton with insets all of 0 (so no “Extra” button is drawn), turn “isOpage” to false so its background isn’t drawn, and you can set paintBorder and paintFocus to false as well, see if this helps.