So I have been programming a bit with java for a while, and I started on making games, as I'm not super experienced with it I decided to make a simple 2D game. It was going pretty good until I met a problem: (can't embed pictures yet, but basically it says as in my title.
This is the code I have been using for the Application that received the error:
import java.awt.EventQueue;
import javax.swing.JFrame;
public class Application extends JFrame {
public Application() {
initUI();
}
private void initUI() {
add(new Board());
setSize(250, 200);
setTitle("Application");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLocationRelativeTo(null);
}
public static void main(String[] args) {
EventQueue.invokeLater(() -> {
Application ex = new Application();
ex.setVisible(true);
});
}
}
Anyone know why I got that error and how to fix it?