Java tutorial
//package com.java2s; import java.awt.image.BufferedImage; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabel; public class Main { public static JFrame getImageJFrame(BufferedImage image) { ImageIcon icon = new ImageIcon(); icon.setImage(image); JFrame frame = new JFrame(); frame.add(new JLabel(icon)); frame.pack(); return frame; } }