-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add new Gradle task launch4j - Update README.md - Small code improvements
- Loading branch information
Showing
10 changed files
with
83 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,37 @@ | ||
/* Main created on 10.07.2006 */ | ||
|
||
import com.devng.starsudoku.GV; | ||
import com.devng.starsudoku.gui.SudokuMainFrame; | ||
|
||
import javax.swing.JOptionPane; | ||
import javax.swing.UIManager; | ||
|
||
public class StarSUDOKUMain { | ||
|
||
public static void main(String[] args) { | ||
public static void main(String[] args) throws Exception { | ||
final String os = System.getProperty("os.name").toLowerCase(); | ||
|
||
if(System.getProperty("os.name").toLowerCase().startsWith("windows")) { | ||
try { | ||
UIManager | ||
.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); | ||
com.devng.starsudoku.GV.isWin = true; | ||
} catch (Exception exc) { | ||
com.devng.starsudoku.GV.isWin = false; | ||
exc.printStackTrace(); | ||
} | ||
} | ||
if(os.startsWith("windows")) { | ||
// The system Look and Feel only looks good on Windows | ||
UIManager.setLookAndFeel(GV.LAF.SYSTEM.getLookAndFeelClassName()); | ||
GV.useSystemLAF = true; | ||
} else { | ||
UIManager.setLookAndFeel(GV.LAF.METAL.getLookAndFeelClassName()); | ||
} | ||
|
||
String jVer = System.getProperty("java.version"); | ||
final String jVer = System.getProperty("java.version"); | ||
if(jVer.compareToIgnoreCase("1.7.0") < 0) { | ||
String errorMsg = "<HTML><FONT COLOR=\"RED\">Your Java version is too old!</FONT><BR><BR>Star SUDOKU requires JAVA Runtime Environment JRE 1.7.0 / JRE 7 or above.<BR> Please download the latest JRE at <FONT COLOR=\"#0000ff\">www.java.com</FONT></HTML>"; | ||
String errorMsg = "<HTML><FONT COLOR=\"RED\">Your Java version is too old!</FONT><BR><BR> " + | ||
"Star SUDOKU requires JAVA Runtime Environment JRE 1.7.0 / JRE 7 or above.<BR> " + | ||
"Please download the latest JRE at <FONT COLOR=\"#0000ff\">www.java.com</FONT></HTML>"; | ||
JOptionPane.showMessageDialog(null, | ||
errorMsg, "Fatal error", | ||
JOptionPane.ERROR_MESSAGE); | ||
return; | ||
} | ||
|
||
com.devng.starsudoku.gui.SudokuMainFrame f = | ||
new com.devng.starsudoku.gui.SudokuMainFrame(); | ||
final SudokuMainFrame f = new SudokuMainFrame(); | ||
f.generateNewSudoku(); | ||
f.setVisible(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.