0

Hello!

I have size about 200*250 icon for my simple application. I need to put it inside on frame as (about) 40*40 size. But when i try everything (image icon, icon for JLabel...) but i could not re-size it inside on JFreme. I f i set the size as 40*40, it just shows the small part of image ( about %20 of image).

Can someone help me for that?

Thank you!

3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by mKorbel
0

You will have to re-scale your image to to the size you want it to be. You can use the getScaledInstance method on your Image to create a smaller version that will fit your JFrame.

0

You will have to re-scale your image to to the size you want it to be. You can use the getScaledInstance method on your Image to create a smaller version that will fit your JFrame.

Works Thank you! :)

Edited by canarian: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.