I'm new to Java and I'm trying use Java 2D to try to get familiar with the language. I did the same thing with Python/Pygame to make simple games (snake, minesweeper etc) without too much struggle, but Java 2D seems a whole lot more complicated.
I'm following the tutorial on this site, but in the SimpleEx.java code example I can't figure out what's going on:
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
BasicEx ex = new BasicEx();
ex.setVisible(true);
}
});
It looks like a new method is being declared inside the .invokeLater() method call. Is this run() method a separate argument being passed into invokeLater()? Or is it adding this method to the new Runnable() object before the object is passed into the method?