String ret = fc.getDialogTitle(); if (ret != null) return ret; switch (fc.getDialogType()) { case JFileChooser.OPEN_DIALOG: ret = openButtonText; break; case JFileChooser.SAVE_DIALOG: ret = saveButtonText; break; default: ret = fc.getApproveButtonText(); break; } if (ret == null) ret = openButtonText; return ret;
String result = fc.getDialogTitle(); if (result == null) result = getApproveButtonText(fc); return result;
  public String getDialogTitle(JFileChooser fc)  {    String ret = fc.getDialogTitle();    if (ret != null)      return ret;    switch (fc.getDialogType())      {      case JFileChooser.OPEN_DIALOG:	ret = openButtonText;	break;      case JFileChooser.SAVE_DIALOG:	ret = saveButtonText;	break;      default:	ret = fc.getApproveButtonText();	break;      }    if (ret == null)      ret = openButtonText;    return ret;  }