Hi,
I am trying to write a program in Java and I am having a problem with a small part of it.

I am using a JLabel to display an image. The JLabel is added to a JPanel with fixed width and height. But the problem is that the image now is shown partially.

Is there any methot to make the image scaled down so they it can be fully shown?

Thanks in advance :)

The Image class has a getScaledInstance method.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.