I want to display boxes that are actually image placeholders in Swing. They are fixed size and the image, once loaded into the placeholder, will scale to fit the placeholder. I'd also like to be able to paint over them. Nothing grand. Just simple dots and lines, done with clicks outside the image (in some JButton, say), no brushes.
I originally thought of using a JLabel then setIcon from it. But that won't scale would it? Besides, I don't think it'd allow me to paint over them.
I've thought of extending JComponent, using ImageIO.read to get an image, then displaying it with paintComponent. But I'm not sure if, again, I'd be able to paint over the image. Besides, I find this GUI component to be pretty common that I may be reinventing the wheel.
Any suggestions?