#91;1],zahln[0],zahlz[1]);
System.out.print(antwort);
eins = antwort.indexOf("#", 1);
zwei = antwort.indexOf("#", eins + 1);
zaehlerstring = antwort.substring(1, eins);
nennerstring = antwort.substring(eins + 1, zwei);
zahlz[2] = Integer.parseInt(zaehlerstring);
zahln[2] = Integer.parseInt(nennerstring);
zaehler.setText(new Integer(zahlz[2]).toString());
nenner.setText(new Integer(zahln[2]).toString());
}
}
}
/**
* Shutdown procedure when run as an application.
*/
protected void windowClosed()
{
// TODO: Check if it is save to close the application
// Exit application.
dispose();
System.exit(0);
}
public static void main(String args[])
{
Rational fridolin = new Rational();
fridolin.setSize(300, 300);
fridolin.setLocation(100, 100);
fridolin.setTitle("Rational");
fridolin.setVisible(true);
}
}
[/code]
System.out.print(antwort);
eins = antwort.indexOf("#", 1);
zwei = antwort.indexOf("#", eins + 1);
zaehlerstring = antwort.substring(1, eins);
nennerstring = antwort.substring(eins + 1, zwei);
zahlz[2] = Integer.parseInt(zaehlerstring);
zahln[2] = Integer.parseInt(nennerstring);
zaehler.setText(new Integer(zahlz[2]).toString());
nenner.setText(new Integer(zahln[2]).toString());
}
}
}
/**
* Shutdown procedure when run as an application.
*/
protected void windowClosed()
{
// TODO: Check if it is save to close the application
// Exit application.
dispose();
System.exit(0);
}
public static void main(String args[])
{
Rational fridolin = new Rational();
fridolin.setSize(300, 300);
fridolin.setLocation(100, 100);
fridolin.setTitle("Rational");
fridolin.setVisible(true);
}
}
[/code]