title: Insert only numbers in Spinner Control
body: <p>I tested Spinner control in Java 8u40</p>
  
  <pre><code>import javafx.application.Application;
  import javafx.geometry.Insets;
  import javafx.scene.Scene;
  import javafx.scene.control.Label;
  import javafx.scene.control.Spinner;
  import javafx.scene.control.SpinnerValueFactory;
  import javafx.scene.layout.GridPane;
  import javafx.stage.Stage;
  
  public class MainApp extends Application
  {
      public static void main(String[] args)
      {
          Application.launch(args);
      }
  
      @Override
      public void start(Stage stage)
      {
          final Spinner spinner = new Spinner();
  
          spinner.setValueFactory(new SpinnerValueFactory.IntegerSpinnerValueFactory(0, 10000));
          spinner.setEditable(true);
  
          GridPane grid = new GridPane();
          grid.setHgap(10);
          grid.setVgap(10);
          grid.setPadding(new Insets(10));
  
          int row = 0;
  
          grid.add(new Label("Spinner:"), 0, row);
          grid.add(spinner, 1, row);
  
          Scene scene = new Scene(grid, 350, 300);
  
          stage.setTitle("Hello Spinner");
          stage.setScene(scene);
          stage.show();
      }
  }
  </code></pre>
  
  <p>How I can only insert number into the spinner control field?</p>
  
  <p>Now I can insert numbers and text. Is there any example that can be used as example?</p>