title: Reseting Spinner Value in Java Swing
body: <p>I have knowledge about C programming but  I'm a newbie Java Programmer, and I want to ask a question to you. I try to set both spinners values null if they are less then "1" but I couldn't do it. I'm waiting for your helps, thank you.</p>
  
  <pre><code>Spinner spinnermin = new JSpinner();
      spinnermin.addFocusListener(new FocusAdapter() {
          @Override
          public void focusLost(FocusEvent e) {
              valuemin =(Integer) spinnermin.getValue();
              if(valuemin&lt;0){
                  spinnermin.setValue(null);
  
              }
          }
      });
      spinnermin.setBounds(478, 215, 76, 20);
      frame.getContentPane().add(spinnermin);
  
      JSpinner spinnerhour = new JSpinner();
      spinnerhour.addFocusListener(new FocusAdapter() {
          @Override
          public void focusLost(FocusEvent e) {
              valuehour = (Integer) spinnerhour.getValue();
              if(valuehour&lt;1){
                  spinnerhour.setValue(null);
  
              }
          }
      });
      spinnerhour.setBounds(362, 215, 86, 20);
      frame.getContentPane().add(spinnerhour);
  </code></pre>