Java Textfield ONLY NUMBERS

  • (2 Pages)
  • +
  • 1
  • 2

16 Replies - 29263 Views - Last Post: 15 February 2013 - 08:06 PM Rate Topic: -----

#16 burakaltr  Icon User is offline

  • D.I.C Regular

Reputation: 91
  • View blog
  • Posts: 280
  • Joined: 07-November 10

Re: Java Textfield ONLY NUMBERS

Posted 15 February 2013 - 08:03 PM

View Postpbl, on 15 February 2013 - 07:53 PM, said:

View Postburakaltr, on 14 February 2013 - 11:34 PM, said:

if(!Character.isDigit(i.charAt(y))){

arg0.consume();

}

Cute idea... never though of it
but still prefer my way of doing it, seems less like a hack
But your choice

Yes, Thank you for Your feedback. I am not big at JAVA , but I did not pilfer the code from the web ( if that's what you mean from " hack " ). I wrote it myself.

This post has been edited by burakaltr: 15 February 2013 - 08:05 PM

Was This Post Helpful? 0
  • +
  • -

#17 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8378
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: Java Textfield ONLY NUMBERS

Posted 15 February 2013 - 08:06 PM

What I meant by "hack" is "passing by the back door"
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2