public DisplayImage(BufferedImage image) {
        this.image = image;
        size.setSize(image.getWidth(), image.getHeight());
        JFrame f = new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.add(new JScrollPane(this));
        f.setSize(image.getWidth(), image.getHeight());
        f.setLocation(0, 0);
        f.setVisible(true);
    }