title: Create a numeric text box in java Swing with increment and decrement buttons
body: <p>How can I create a numeric text box in java swing , which has two buttons (up and down) which increments and decrements the value in the text box respectively. Also this text box must be editable with <strong>ONLY NUMERIC VALUES</strong>. Something like this</p>
  
  <p><img src="https://i.stack.imgur.com/m2nh9.jpg" alt="Numeric Text Box"></p>
  
  <p>I tried by placing two buttons near a text box and manually doing the operation on button click. </p>
  
  <p><img src="https://i.stack.imgur.com/vbyD5.jpg" alt="My try Text Box"></p>
  
  <p>Is there any other method in which I can do this in a better way and achieve a similar result as the first image. </p>
  
  <p>Thanks :)</p>