Removes panel draw call and creates a buffer strategy for the JFrame rather than the panel.
@@ -47,9 +47,8 @@ public class PanelBuilder {
}
currentScreen.setParentPanel(panel);
- panel.createBufferStrategy(2); // Reduces draw time by ~200%.
+ frame.createBufferStrategy(2);
panel.setFocusable(true);
- panel.draw();
return panel;
}
