private static void createAndShowGUI(List<File> pngs){
  JFrame frame=new JFrame("ImageViewer");
  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  ImageViewer animator=new ImageViewer(pngs);
  frame.add(animator,BorderLayout.CENTER);
  frame.pack();
  frame.setVisible(true);
}

private static void createAndShowGUI ( List < File > pngs ) { JFrame frame = new JFrame ( "ImageViewer" ) ; frame . setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ; ImageViewer animator = new ImageViewer ( pngs ) ; frame . add ( animator , BorderLayout . CENTER ) ; frame . pack ( ) ; frame . setVisible ( true ) ; }
create the gui and show it . for thread safety , this method should be invoked from the event - dispatching thread .
