Tuesday, 24 January 2017

Java: Image appearing very small in JPanel

So I have an image being drawn inside a JPanel which itself is added to a JFrame. However when the Image is first drawn it appears to be very small. I'm not sure if this is a problem with the panel or a problem with the image. It is illustrated below:
![enter image description here][1]



I have drawn a rectangle around the image.



Now the JPanel is supposed to be contained within the JFrame. The JFrame is not supposed to be coloured in as is seen above. The JPanel is meant to be about a quarter of the size of the JFrame and the image is supposed to take up almost all of the JPanel.




Could you please tell me if it's the image which is the problem or the Panel. Sorry if it seems obvious.



Awaiting SSCCE

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...