Re: a little help please

From: Mike B (mrcics2000-news-nomail_at_nomail.yahoo.com)
Date: 11/28/04


Date: Sun, 28 Nov 2004 16:45:32 -0600

phenom <dub420_05@msn.com> wrote:
> okay, i've got a program for my java class that i'm having a little
> trouble with. the user input their birthday ( 2 digit mos, 2 digit
> day, 2 digit year) and there are 3 JButtons, calculate, clear and
> exit. the clear and exit are fairly simple, but i'm having trouble
> with the calculate button. the logic for the calc button is fairly
> straight forward, but the problem i'm having is getting the
> JTextField inputs into the calculations. how do i take the text
> inputs and make them integers so i can use them to run the needed
> calculations?

You can parse the String into an int. See the methods for String at
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html

-- 
Mike B 

Quantcast