title: A textbox class only accept integers in Java
body: <p>I just want to do a textbox class only accepts integers..</p>
  
  <p>I have done something, but ı think it's not enough.</p>
  
  <p>Can anyone help me, please?
  Thanks...</p>
  
  <pre><code>import java.awt.TextField
  public class textbox extends TextField{
      private int value;
  
      public textbox(){
          super();
  
      }
  
      public textbox(int value){
          setDeger(value);
      }
  
      public int getValue() {
          return value;
      }
  
      public void setValue(int value) {
  
          this.value = value;
      }
  }
  </code></pre>