EXIT_ON_CLOSE cannot be resolved as a variable?
public class App {
public static void main(String[] args) {
MainFrame frame = new MainFrame();
frame.setSize(700, 700);
frame.setVisible(true);
frame.setLocationRelativeTo(null);
frame.setTitle("2d Plattformer");
frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
}
}
Bei diesem Code kommt der Fehlercode "EXIT_ON_CLOSE cannot be resolved as a variable". Außerdem startet das Programm nicht. Was muss ich anders tun?