Skip to content

Commit

Permalink
UI of the validate application now feels modern (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshtdev authored and lognaturel committed Mar 19, 2018
1 parent 4f62ee7 commit 4f78391
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions src/org/opendatakit/validate/FormValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}

}


Expand Down

0 comments on commit 4f78391

Please sign in to comment.