boolean (@NotNull JTextField textField, int initialValue) { try { int fieldValue = Integer.parseInt(textField.getText().trim()); return fieldValue != initialValue; } catch (NumberFormatException e) { return false; } }