I think you mean transparency, not invisible.
This will make the button pressed that is not "visible", i.e. transparent:
button.setOpaque(false);
button.setContentAreaFilled(false);
button.setBorderPainted(false);
, , :
ImageIcon myImage = new ImageIcon("images/myImage.jpg");
JButton button = new JButton(myImage);