2 Replies - 770 Views - Last Post: 28 September 2007 - 11:20 AM Rate Topic: -----

#1 Mastergeek666  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 151
  • Joined: 10-August 07

A way to only allow positives

Posted 28 September 2007 - 11:01 AM

Hey I know I'm supposed to search for stuff like this but I couldn't find anything. Is there a way to only allow positives in the input once it reads it???
Is This A Good Question/Topic? 0
  • +

Replies To: A way to only allow positives

#2 alpha02  Icon User is offline

  • Sexy DIC God
  • member icon

Reputation: 47
  • View blog
  • Posts: 803
  • Joined: 20-May 06

Re: A way to only allow positives

Posted 28 September 2007 - 11:11 AM

if (Integer.parseInt(textfield.getText()) < 0){decline}
else{accept}

Was This Post Helpful? 0
  • +
  • -

#3 Mastergeek666  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 151
  • Joined: 10-August 07

Re: A way to only allow positives

Posted 28 September 2007 - 11:20 AM

View Postalpha02, on 28 Sep, 2007 - 11:11 AM, said:

if (Integer.parseInt(textfield.getText()) < 0){decline}
else{accept}




Thanks
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1