diff --git a/src/test/GUITest.java b/src/test/GUITest.java index 59f3532..9a58bbc 100644 --- a/src/test/GUITest.java +++ b/src/test/GUITest.java @@ -1,10 +1,32 @@ package test; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; + import view.CheckersWindow; public class GUITest { public static void main(String[] args) { + + // Need to set the look and feel for this to be cross platform + try { + // Set cross-platform Java L&F (also called "Metal") + UIManager.setLookAndFeel( + UIManager.getCrossPlatformLookAndFeelClassName()); + } + catch (UnsupportedLookAndFeelException e) { + // handle exception + } + catch (ClassNotFoundException e) { + // handle exception + } + catch (InstantiationException e) { + // handle exception + } + catch (IllegalAccessException e) { + // handle exception + } CheckersWindow window = new CheckersWindow(); } }