I\'m trying to code a simple game in Java. The basic structure is a single JFrame with different JPanels that I add/remove at different times. At s
JFrame
JPanels
The layout and painting must be done in EDT. Use SwingUtilities.invokeAndWait to call the validate() and repaint()
SwingUtilities.invokeAndWait
validate()
repaint()