Posted by Zoe on 2001-06-22
Hi, all I am not sure how much of you do Java
programming, please help me if you can. I have this
for my applet for result output.
String num;
num = text2.getText(); //input field
int x;
x = num.lastIndexOf('.');
x = (x >= 0) ? (x) : num.length();
int ft = Integer.parseInt(num.substring(0, x));
//5
double test;
test = Double.parseDouble(num) - ft;
labelout.setText(Double.toString(test));
This will look ok and compiles ok but the problems
occurs when I enter a value. You see this line:
test = Double.parseDouble(num) - ft;
Does not work at all. Some how this
"Double.parseDouble(num)" courses a problem and result
in no output.
help me,
zoe
p.s. anyone know any good Java IRC chat channel?
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
Previous post | Next post | Timeline | Home