Link to home
Start Free TrialLog in
Avatar of stepherd
stepherd

asked on

ints in textfield?

How does one go about producing a field that looks like a text field but that accepts integers as integers and not as strings?

For example:  If you have an applet with  the following:

      fieldtwo = new Panel();
      fieldtwo.add(label2 = new Label ("Value One: ",         Label.LEFT));
      fieldtwo.add(ipadd = new TextField(30));        
      add("South", fieldtwo);

And then later want to do this:

                  one = name.getText();

How can one make the variable "one" a int and not
a string?

Thanks!

--Dave Stephens
ASKER CERTIFIED SOLUTION
Avatar of conick
conick

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial