Hallo,
in einem größeren Projekt habe ich bei einer methode die oben stehende excpection. Das programm läuft zwar genau wie es soll, dennoch ist die exception (1 mal nur) da. Try/catch klappt auch nicht.
in einem größeren Projekt habe ich bei einer methode die oben stehende excpection. Das programm läuft zwar genau wie es soll, dennoch ist die exception (1 mal nur) da. Try/catch klappt auch nicht.
Java:
public class graphic extends JFrame{
public void disableAll() {
try {
if (this.isAncestorOf(muteTextField))
this.remove(muteTextField);
if (this.isAncestorOf(liveDisplay))
this.remove(liveDisplay);
if (this.isAncestorOf(scoreDisplay))
this.remove(scoreDisplay);
if (this.isAncestorOf(highscoreDisplay))
this.remove(highscoreDisplay);
if (this.isAncestorOf(menuMessage))
this.remove(menuMessage);
for (JTextField timeDisplay1 : timeDisplay) {
if (this.isAncestorOf(timeDisplay1))
this.remove(timeDisplay1);
}
for (JTextField text : textfieldList) {
if (this.isAncestorOf(text))
this.remove(text);
}
} catch (Exception e) {
System.out.println("ERROR");
}
restartMessge.setVisible(true);
}
}