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

Member Avatar for iamthwee

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

Sorry wrong thread...

Be a part of the DaniWeb community

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