I have a JPanel to which I\'d like to add JPEG and PNG images that I generate on the fly.
All the examples I\'ve seen so far in the Swing Tutorials, specially in the
ImageIcon
s. For a single image, I would think about making a custom subclass of JPanel
and overriding its paintComponent
method to draw the image.