public static void showDialog ( BufferedImage img ) { ImageIcon icon = new ImageIcon ( ) ; icon . setImage ( img ) ; JOptionPane . showMessageDialog ( null , icon ) ; }
Creates a dialog window showing the specified image . The function will not exit until the user clicks ok