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
See this working code :
ImageFrame Class :
Source : Java: Loading images in JFrame – Reusable ImageFrame