How can I display a BufferedImage in a JFrame?

bufferedimage, java, jframe, swing

Solution

You will have to repaint the `JFrame` whenever you update the image.

Here is what a simple google on the topic brings up: (I use those tutorials for all my Java coding)

Java Tutorial: Drawing an Image

Problem

I want to display variations of the same image in the same JFrame, for example display an image in JFrame, then replace it with gray scale of the same image.

Original source