Image size change

I am using a .gif image as an image icon for a button but i observe that when i do so, the size of the image seems to be changed. If i set preferred size of the button equal to the size of the image in pixel, only a part of the image comes on that button. When I tried to look a little deep into it i found that all the .gif images become big on importing them.

Why does it happen. Any solution to keep them to the same size?

[438 byte] By [new_rishia] at [2007-11-27 6:34:12]
# 1
There is no need to manually set the preferred size of the button. The preferred size of the button will be the size of the image plus the size of the border for the button.Of course a layout manager can override this preferred size.
camickra at 2007-7-12 18:00:30 > top of Java-index,Desktop,Core GUI APIs...