public void actionPerformed(ActionEvent e) {
   String cmd = e.getActionCommand();
   if (cmd.equals("ok")) {
     choice = OPTION_OK;
     setVisible(false);
   } else if (cmd.equals("cancel")) {
     choice = OPTION_CANCEL;
     setVisible(false);
   } else if (cmd.equals("permissions")) {
     permDiag.setVisible(true);
   }
 }
 public int getDirectoryPermissions() {
   return permDiag.getDirectoryPermissions();
 }
 public int getFilePermissions() {
   return permDiag.getFilePermissions();
 }