code: private void printText(PrintWriter pw, String key, String defaultText) {
          String text = null;
          if (key != null) {
              ResourceBundle bundle = null;
  
              // retrieve the resource bundle
              try {
                  bundle = ResourceBundle.getBundle(DIST_EX_RESOURCE_BUNDLE_NAME);
              } catch (MissingResourceException e) {
                  text = defaultText;
              }
  
              // if the resource bundle was successfully retrieved, get the specific text based
              // on the resource key
              if (bundle != null) {
                  try {
                      text = bundle.getString(key);
                  } catch (MissingResourceException e) {
                      text = defaultText;
                  }
              }
          } else { // no key was provided
              text = defaultText;
          }
  
          pw.println(text);
      }
docs: Insert the method's description here.
  Creation date: (3/9/00 10:25:31 PM)
  
  @return java.lang.String
  @param key java.lang.String