Example #1
0
 /** Called when the user pressed the enter button. */
 @Override
 public void enterPressed() {
   String file = null;
   file = fileChooser.getFileName();
   fileChooser.setCurrentFileName(file);
   if (!(file == null)) {
     notifyListeners(file);
   }
   setVisible(false);
 }
Example #2
0
  /** Implementing the action of pressing the ok button. */
  public void okButton_actionPerformed() {

    String file = null;
    file = fileChooser.getFileName();
    fileChooser.setCurrentFileName(file);
    setVisible(false);
    if (!(file == null)) {
      notifyListeners(file);
    }
  }
Example #3
0
 /** Sets the file name (which is written inside the text field). */
 public void setFileName(String name) {
   fileChooser.setCurrentFileName(name);
   fileChooser.showCurrentFileName();
 }