public PopUp(BufferedImage image, String title)
    {
        // format title if too long
        if(title.length() > (TITLE_LENGTH+3)) title = "..." + title.substring(title.length()-TITLE_LENGTH);

        // create frame
        JFrame frame = new JFrame(title);
        frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        frame.setLayout(new BorderLayout());
        frame.setResizable(false);

        // create centering panel
        JPanel panel = new JPanel(new BorderLayout());
        panel.setBackground(Color.darkGray);
        panel.add(new ScalingImagePanel(image), BorderLayout.CENTER);
        panel.setSize(image.getWidth(), image.getHeight());

        // pack and show
        frame.add(panel);
        frame.pack();
        frame.setLocationRelativeTo(null);
        frame.pack();
        frame.setVisible(true);
    }