jbutton set background transparent

Java
button.setOpaque(false);
button.setContentAreaFilled(false);
button.setBorderPainted(false);
Source

Also in Java: