• Post Reply Bookmark Topic Watch Topic
  • New Topic

Image size

 
Paul Keohan
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am including a JLabel of a gif image on a panel. How can I ensure that the size of the image will be the same size as the text that follows it.
Basically I want something like the type of heading you see in most windows - a little icon with the title text following it.
Thanks.
Paul
 
Shane Roylance
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know how much use this is to you, but you can resize the image you read in quite easily:

16x16 is the normal icon size in a toolbar of most windows programs. 32x32 is the size of icons on your desktop.
Shane
 
Paul Keohan
Ranch Hand
Posts: 411
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the ImageIO class?
Paul
 
Shane Roylance
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry,
The ImageIO class is new to java 1.4. That's all I've been using lately, so I forget that it's new. But BufferedImage is not new to 1.4, the functionality there is at least available in 1.3, but I am not sure how much farther than that.
Shane
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!