Ich bin neu in JAVA, ich versuche, eine Eingabe aus einem JTextField in eine Ganzzahl umzuwandeln. Ich habe viele Optionen ausprobiert, aber nichts funktioniert, Eclipse gibt mir immer einen Fehler und die Fehler ergibt für mich keinen Sinn.
import java.awt.Graphics; import java.awt.Color;
public class Kreis erweitert Form {
public int x;
public int y;
public int Radius;
public Kreis(int Radius, int x, int y, Color c) {
super(c);
this.x = x;
this.y = y;
this.Radius = Radius;
}
public void zeichnen(Graphics g) {
g.setColor(super.getColor());
g.fillOval(x-Radius, y-Radius, Radius * 2, Radius * 2);
}
}