hiho, we are trying to get the text from a textfield and convert this string to a int/double value but it doesnt work. here is our code
public void Addieren()
{
string hallo = zahl1.getText();
double d1 = Double.parseDouble(zahl1.getText());
double d2 = Double.parseDouble(zahl2.getText());
double ergebnis = d1-d2;
ausgabe.setText = ergebnis.toString();
}
zahl1, zahl2 are the two textfield ids.
thx in advance
public void Addieren()
{
string hallo = zahl1.getText();
double d1 = Double.parseDouble(zahl1.getText());
double d2 = Double.parseDouble(zahl2.getText());
double ergebnis = d1-d2;
ausgabe.setText = ergebnis.toString();
}
zahl1, zahl2 are the two textfield ids.
thx in advance