PDA

View Full Version : Help needed for java code


Inquisit
08-29-2008, 11:19 AM
basically what i was trying to do is write a code to clear text variables

string s;
s=txtNumber1.setText("");
s=txtNumber2.setText("");
s=txtAnswer.setText("");
txtAnswer.setText(s); error i get says incompatible

what its meant to do is clear variables that you input
lets say addition of two numbers
...................................................
i.e string s;
ceil no1;
ceil no2;
s=txtn1.getText();
no1=Ceil.parseCeil(s) etc:(

Aradon
08-29-2008, 12:38 PM
What is the type of txtNumber1? Or the other txtNumbers? Are they JLabels?

Without knowing what types they are I'm not sure how to answer your question.

Also, what is Ceil?

If you could post your full working source code, that would help. :)