diff --git a/src/org/opendatakit/validate/FormValidator.java b/src/org/opendatakit/validate/FormValidator.java index b3ac5bc..fed4dd5 100644 --- a/src/org/opendatakit/validate/FormValidator.java +++ b/src/org/opendatakit/validate/FormValidator.java @@ -44,6 +44,8 @@ import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; import javax.xml.parsers.DocumentBuilderFactory; import org.javarosa.core.model.Constants; @@ -120,12 +122,28 @@ public class FormValidator implements ActionListener { public static void main(String[] args) { - if ( args.length == 1 ) { - String path = args[0]; - new FormValidator().validateAndExitWithErrorCode(path); - } else { - new FormValidator().show(); + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + if (args.length == 1) { + String path = args[0]; + new FormValidator().validateAndExitWithErrorCode(path); + } else { + new FormValidator().show(); + } + } + catch (UnsupportedLookAndFeelException e) { + e.printStackTrace(); } + catch (ClassNotFoundException e) { + e.printStackTrace(); + } + catch (InstantiationException e) { + e.printStackTrace(); + } + catch (IllegalAccessException e) { + e.printStackTrace(); + } + }