0
How can I set the image?
I tried to set the image through setBounds and setSize but the image is not correctly set , the image is visible and the size is by default, how I set the image correctly by own? https://code.sololearn.com/cf7ZE5g5h3dp/?ref=app
4 Réponses
+ 1
I would say you need to use createImageIcon()
ImageIcon i1 = createImageIcon("laughing.png");
https://docs.oracle.com/javase/tutorial/uiswing/components/icon.html
+ 2
+ 1
I try this one, Thank you 😊
0
But how I set the image because I make project guess emoji song then I put the multiple images so it's necessary for me to set the image size.