Hi,
I'm new to java.
When I load an image(picture) from file, I need to get the width and heigth of that image so I can resize the JFrame to be the exact size as the image.
I have two classes PictureFrame and Picture class.
PictureFrame:
private Image picture;
I load the image in this class.
Picture:
this class is used to display the loaded picture in a JFrame that is the exact size of the image that I loaded.
That is why I need the width and height.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.