Hey Guys and Gals

I just seeing if anyone can help me out?

I discovered how to convert a Gui textfeild into an String but cant seem to find the on the api to do it for an int?

For example int num = tfNum*****; Just cant find a appropiate method.


Can any one help, any would be much appreciated.

Efliction

You mean something like this?

JTextField crap = new JTextField("400",10);
.
.
.
int num = Integer.parseInt(crap.getText());

You mean something like this?

JTextField crap = new JTextField("400",10);
.
.
.
int num = Integer.parseInt(crap.getText());

Hi there,

Cheers for that, i already figured it out through the api

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.