Question

What I'm trying to do is to get an already buffered image painted to a JFrame.

JFrame p1=new JFrame();
p1.getContentPane();
p1.setSize(new Dimension(h,w));
p1.setVisible(true);
p1.update(bufferedImage.getGraphics());

This is the code so far. bufferedImage is a buffered image, but this code only opens the JFrame and doesn't paint the image. I've never worked with graphics before. Thanks

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top