which type does jSpinner.getValue() return?if jSpinner.getValue() returns with a String value u should write Integervariable=Integer.parseInt(jSpinner.getValue()) ...this is just for String...