I have a JPanel in which I placed a JLabel of the same size as the JPanel. I set the icon property of the JLabel to a jpg image file. The image file displays, but it is too large, and needs to be resized.
How do I resize the displayed (in the JLabel) icon to be the same height and width as the JLabel?
Possibly, JLabel icons cannot be resized, which would explain why I'm running into a dead end. If so, would someone tell me the best way to display a picture in a JPanel, sized to the same size as the JPanel?
(As an aside, my IDE is Netbeans. But, I think this is just a Java question.)