From d129367c79097bfb8f80ad10c506339777af5516 Mon Sep 17 00:00:00 2001 From: fdai7382 Date: Tue, 31 Jan 2023 11:42:07 +0100 Subject: [PATCH] refactoring: [MouseGame Class]: Auslagern der Font. --- .../hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java b/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java index 277fecc..75e45e6 100644 --- a/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java +++ b/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java @@ -24,6 +24,8 @@ public class MouseGame extends JFrame { public Color farbeBeige = new Color(128, 128, 128); public Color farbeSchwarz = new Color(0, 0, 0); + public Font fontTahoma = new Font("Tahoma", Font.BOLD, 30); + int resetX = 200; int resetY = 170; @@ -70,13 +72,13 @@ public class MouseGame extends JFrame { JLabel labelStart = new JLabel("Start"); labelStart.setHorizontalAlignment(SwingConstants.CENTER); - labelStart.setFont(new Font("Tahoma", Font.BOLD, 30)); + labelStart.setFont(fontTahoma); labelStart.setBounds(10, 11, 83, 49); contentPane.add(labelStart); JLabel labelZiel = new JLabel("Ziel"); labelZiel.setHorizontalAlignment(SwingConstants.CENTER); - labelZiel.setFont(new Font("Tahoma", Font.BOLD, 30)); + labelZiel.setFont(fontTahoma); labelZiel.setBounds(809, 525, 67, 49); contentPane.add(labelZiel);