This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When you add a jSpinner via the GUI form builder and set the Model to "Number" with type "Integer" something along the following lines is created by netbeans: spNumber.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(1), Integer.valueOf(0), null, Integer.valueOf(1))); The cast to integer throws a warning message "Unnecessary boxing to Integer". However if you define a "minimum value" and "maximum value", the code being generated seems to be correct: spNumber.setModel(new javax.swing.SpinnerNumberModel(1, 0, 99999, 1)); If either "minimum value" or "maximum value" is not set, improper code is produced.
Actually fixed as bug 254218. *** This bug has been marked as a duplicate of bug 254218 ***