From d141d9032b7120b6d158659f362c97142a5a846e Mon Sep 17 00:00:00 2001 From: Arthur <78031901+Arthur7770@users.noreply.github.com> Date: Tue, 20 Apr 2021 11:11:07 +0200 Subject: [PATCH] New Look and feel Theme --- src/lsystem/screen/main/Listener.java | 3 +-- src/lsystem/screen/main/MainFrame.java | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lsystem/screen/main/Listener.java b/src/lsystem/screen/main/Listener.java index 68f691b..f944b1d 100644 --- a/src/lsystem/screen/main/Listener.java +++ b/src/lsystem/screen/main/Listener.java @@ -90,8 +90,7 @@ public class Listener extends AbstractListener implements KeyListener, MouseWhee } @Override - public void keyTyped(KeyEvent ke) { - + public void keyTyped(KeyEvent e) { } diff --git a/src/lsystem/screen/main/MainFrame.java b/src/lsystem/screen/main/MainFrame.java index 0089b7a..4caa069 100644 --- a/src/lsystem/screen/main/MainFrame.java +++ b/src/lsystem/screen/main/MainFrame.java @@ -8,6 +8,7 @@ import lsystem.screen.gl3d.AbstractCanvas; import lsystem.utils.Pair; import javax.swing.*; +import javax.swing.plaf.nimbus.NimbusLookAndFeel; import java.awt.*; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; @@ -30,6 +31,11 @@ public class MainFrame extends JFrame { * Create a new JFrame on which will be displayed all the GUI elements. */ public MainFrame(){ + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException | IllegalAccessException | UnsupportedLookAndFeelException | InstantiationException e) { + e.printStackTrace(); + } nbRules = 1; nbTabs = 0; basePanel = new JPanel();