public GameOverScreen(Component comp, Graphics2D g2d) { this.component = comp; this.g2d = g2d; background = new ImageEntity(comp); background.load("/resources/gameOverScreen.png"); highScoreNotification = new ImageEntity(comp, g2d); highScoreNotification.load("/resources/newHighscore.png"); highScoreNotification.setPosition(new Point2D(519, 559)); backButton = new Button(comp); backButton.setGraphics(g2d); backButton.load("/resources/backButton.png"); textBox = new TextField(comp, g2d, Color.BLACK, new Font("arial", Font.PLAIN, 30)); textBox.load("/resources/textbox.png"); textBox.setMaxSize(20); textBox.setPosition(new Point2D(451, 600)); textBox.setAction("player_text"); textBox.addObserver(this); entryAddedNotification = new ImageEntity(comp, g2d); entryAddedNotification.load("/resources/leaderboardSuccessNotification.png"); entryAddedNotification.setPosition(new Point2D(textBox.getX(), textBox.getY())); backButton.setPosition(new Point2D(384, 591)); backButton.setAction("back"); backButton.addObserver(this); entryAdded = false; backgroundMusic = new SoundSample("/resources/gameOverSong.wav"); }