In this video I show you how to scale or resize image in jLabel with IntelliJ
Using the label size the image will distort.
Will need to set the size of the image to fit to proportion, the simple calculation I did was to scale it with percentage ratio to 10%
Calculation:
Image width = 3840 Image height = 2160
3840/100 = 38.4 * 10 = 384
2160/100 = 21.6 * 10 = 216
10% of width = 384
10% of height = 216
Minus the 10% from the actual size:
3840 – 384 = 3456
2160 – 216 = 1944
Like and Subscribe to my channel for more awesome video
Thank!
Declaimer!
All the soundtrack in this video are made by nordkeyboard.
Image use in this video are from unsplash
#intellijidea #javatutorial #jframe #jlabel #samieazubike