public static boolean isModified(JTextField textField, int defaultValue, int value) {
    try {
      String text = textField.getText().trim();
      int fieldValue = text.isEmpty() ? defaultValue : Integer.parseInt(text);
      return fieldValue != value;
    }
    catch (NumberFormatException e) {
      return false;
    }
  }
public static boolean isModified(JTextField textField, int defaultValue, int value)