I'm working on this bug for two weeks now, and it really annoys me.
I want to set an image on a JButton, here is my code:
ImageIcon icon = new ImageIcon(this.getClass().getResource("/ecrire.png"));
JButton b1 = new JButton(icon);
b1.setBounds(250, 250, 192, 108);
this.add(b1);
Here is my problem...
The image appears on the button, but it seems that it is only a part of the image that appears on it, and i'd like that the whole image could be on the button her is my result in image: