How to display an error message in java?

i'm trying to modify a java code. I have a jSpinner where the user have to choose a number like minimum 0 and after this step the user can continue by clicking the OK button and continue his steps...

So here what i want is when the user didn't enter any value in the jSpinner and if he clicks the OK button to continue, it must display "Error you must enter minimum value 1!" and stop to go to the next step. The user must stay in the same window.