MyFileChooser pcFileChooser = new MyFileChooser(workingDir);
TN5250jFileChooser pcFileChooser = new TN5250jFileChooser(workingDir);
   private void getPCFile() {      String workingDir = System.getProperty("user.dir");      MyFileChooser pcFileChooser = new MyFileChooser(workingDir);      XTFRFileFilter pngFilter = new XTFRFileFilter("png", "Portable Network Graphics");      pcFileChooser.setFileFilter(pngFilter);      int ret = pcFileChooser.showSaveDialog(new JFrame());      // check to see if something was actually chosen      if (ret == JFileChooser.APPROVE_OPTION) {         File file;         try {            if (!pcFileChooser.getSelectedFile().getCanonicalPath().endsWith(".png"))               file = new File(pcFileChooser.getSelectedFile().getCanonicalPath()                                 + ".png");            else               file = pcFileChooser.getSelectedFile();            EncodeComponent.encode(EncodeComponent.PNG,session, file);         }         catch (Exception e) {            System.out.println("Error generating PNG exception caught: " + e);         }      }   }