I want to make a gif/jpeg or any image work as a button.
When i am creating a button using
JButton my = new JButton("my.gif");
the image is coming on the button but some gap is coming in between the button and the image. I want that the gif should exactly work as a button.