If the spinner uses a JSpinner.DefaultEditor or its subclass, then the following code works (keyboard navigation disabled, spinner buttons do not work, yet it is possible to select and copy the value displayed in the spinner).
JSpinner component = ...;
component.setEnabled( false );
if ( component.getEditor() instanceof JSpinner.DefaultEditor ) {
JSpinner.DefaultEditor editor = ( JSpinner.DefaultEditor ) component.getEditor();
editor.getTextField().setEnabled( true );
editor.getTextField().setEditable( false );
}
If the spinner has a custom editor with something other then JTextComponent, then it is probably still possible to use the same approach (disable the spinner, re-enable the actual component used by the spinner editor, mark that component as read-only using its API).