From 2a87eee0f830c482baf1c6e90020c0867eb9828a Mon Sep 17 00:00:00 2001 From: cyril-colin Date: Tue, 15 Oct 2019 18:43:29 +0200 Subject: [PATCH] fix updates being slow when not moving the mouse --- src/gui/ElevatorCanvas.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/ElevatorCanvas.java b/src/gui/ElevatorCanvas.java index 0a16215..bddcd34 100644 --- a/src/gui/ElevatorCanvas.java +++ b/src/gui/ElevatorCanvas.java @@ -47,6 +47,7 @@ class ElevatorCanvas extends JPanel { g.setColor(Color.BLACK); } g.fillRect(0, y, WIDTH, HEIGHT); + Toolkit.getDefaultToolkit().sync(); } public void setElevatorY(int y) {