This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I've discovered that the size of the image that should fit perfectly into the JButton, should be 4 pixels less in width, and 4 pixels less in height. The JButton above is 62 by 25, and an image 58 by 21 fits perfectly inside it.
But when I used a JButton that was 25 by 25, and I tried to put an image that was 21 by 21 inside it, the image was displayed 1 pixel right, leaving a vertical gray line to the left of the image inside the JButton, and the far right edge of image (1 pixel wide) could not be seen.
I was wondering if there was any convention of image sizes in relation to the JButtons they fit inside.