/** * Draws an animation in the middle of the track showing that the track is being loaded * * @param g graphics where to draw the animation */ public void drawLoadingAnimation(Graphics g) { Image image = Images.getLoadingImage(); int x = (graphicsPanel.getWidth() - image.getWidth(null)) / 2; int y = (graphicsPanel.getHeight() - image.getHeight(null)) / 2; g.drawImage(image, x, y, trackPanel); }