Skip to content

Commit

Permalink
Stop using WindowsLookAndFeel for compatibility with Java 17 (#3489)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone authored Feb 4, 2025
1 parent 18c9010 commit a215eb0
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions java/src/IceGridGUI/src/main/java/com/zeroc/IceGridGUI/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ public static void main(final String[] args) {
System.setProperty("apple.eawt.quitStrategy", "CLOSE_ALL_WINDOWS");

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} else if (System.getProperty("os.name").startsWith("Windows")) {
UIManager.setLookAndFeel("com.jgoodies.looks.windows.WindowsLookAndFeel");
}
// TODO: Setting PlasticLookAndFeel trigger a crash when creating a JFileChooser.
// else // JGoodies L&F
// {
// UIManager.setLookAndFeel("com.jgoodies.looks.plastic.PlasticLookAndFeel");
// }
} catch (Exception e) {
System.err.println(e.toString());
JOptionPane.showMessageDialog(
Expand Down Expand Up @@ -72,8 +65,9 @@ public void windowClosing(WindowEvent e) {
if (_coordinator.needsSaving()) {
if (JOptionPane.showOptionDialog(
Main.this,
"The application has unsaved changes, if you exit all unsaved changes "
+ "will be lost.\nExit and discard changes?",
"The application has unsaved changes, if you exit"
+ " all unsaved changes will be lost.\n"
+ "Exit and discard changes?",
"Save application",
JOptionPane.YES_NO_OPTION,
JOptionPane.YES_NO_OPTION,
Expand Down

0 comments on commit a215eb0

Please sign in to comment.