Remove the border like so:
button.setBorder(BorderFactory.createEmptyBorder());
and then also the contents1:
button.setContentAreaFilled(false);
1: Taken from the solution added to the question by @3sdmx
Remove the border like so:
button.setBorder(BorderFactory.createEmptyBorder());
and then also the contents1:
button.setContentAreaFilled(false);
1: Taken from the solution added to the question by @3sdmx