Why I see only part of the image in the button?

Posted by Roman on Stack Overflow See other posts from Stack Overflow or by Roman
Published on 2010-04-26T09:38:58Z Indexed on 2010/04/26 9:43 UTC
Read the original article Hit count: 133

Filed under:
|
|

I add an image to the button in the following way:

ImageIcon icon = new ImageIcon("images/col.jpg");
tmp = new JButton(icon);

My image is a red sphere but in my button I see only read color. I assume that I see just a small part of the sphere. How can I see the whole image in the button?

© Stack Overflow or respective owner

Related posts about java

Related posts about image