Skip to content

Commit

Permalink
Look and feel is now set to be cross platform
Browse files Browse the repository at this point in the history
  • Loading branch information
john committed Mar 30, 2016
1 parent 1a066a2 commit 4d27ee8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/test/GUITest.java
Original file line number Diff line number Diff line change
@@ -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();
}
}

0 comments on commit 4d27ee8

Please sign in to comment.