Logo Search packages:      
Sourcecode: jmk version File versions  Download package

static int edu::neu::ccs::jmk::awt::MakeWindow::getResourceInt ( String  nm,
int  defaultValue 
) [inline, static, private]

Get an integer from a ResourceBundle.

Parameters:
nm name of key
defaultValue value on error
Returns:
resource as an integer or default value on error

Definition at line 511 of file MakeWindow.java.

References resources.

                                                                 {
    if (resources == null)
      return defaultValue;
    String str;
    try {
      str = resources.getString(nm);
    }
    catch (MissingResourceException mre) {
      return defaultValue;
    }
    if (str == null)
      return defaultValue;
    try {
      return Integer.parseInt(str);
    }
    catch (NumberFormatException ex) {
      return defaultValue;
    }
  }


Generated by  Doxygen 1.6.0   Back to index