boolean (Object component, Object part) { String text = getString(component, "text", null); if (text != null) { try { String value = String.valueOf( Integer.parseInt(text) + ((part == "up") ? 1 : -1)); setString(component, "text", value, null); setInteger(component, "start", value.length(), 0); setInteger(component, "end", 0, 0); repaint(component, "spinbox", null); invoke(component, "action"); return true; } catch (NumberFormatException nfe) {} } return false; }