I am creating time picker using a JSpinner. The text inside the JSpinner is editable. But I want to set the JSpinner as non editable,
JSpinner
Try the following:
JSpinner spinner = ...; ((DefaultEditor) spinner.getEditor()).getTextField().setEditable(false);
This should work as long as you didn't change the spinner editor yourself by calling spinner.setEditor(...).
spinner.setEditor(...)
Tell us if this helps.