I am new to JAVA and have a project that manipulates images. I am able to save the new image to a file but want to display it in a window on the screen. Here is the code I am using. The window opens but the image doesn't display. Resultsimage is a BuffereImage that contains the new image.
Graphics g = resultsimage.getGraphics();
JFrame window = new JFrame("Image");
window.setBounds(0, 0, resultsimage.getWidth()+10, resultsimage.getHeight()+10);
g.drawImage(resultsimage, 5, 5, resultsimage.getWidth(), resultsimage.getHeight(), Color.WHITE, null);
Any help is greatly appreciated.