Skip to content

Commit 987cc94

Browse files
author
GraxCode
committed
change look and feel loading to support java 10
1 parent 74cd098 commit 987cc94

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/me/nov/cafebabe/Cafebabe.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import javax.swing.JScrollPane;
2424
import javax.swing.KeyStroke;
2525
import javax.swing.UIManager;
26+
import javax.swing.UIManager.LookAndFeelInfo;
2627
import javax.swing.filechooser.FileNameExtensionFilter;
2728

2829
import com.alee.laf.WebLookAndFeel;
@@ -183,7 +184,12 @@ public static void main(String[] args) throws Exception {
183184
if (!folder.exists()) {
184185
folder.mkdir();
185186
}
186-
UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
187+
for(LookAndFeelInfo lafi : UIManager.getInstalledLookAndFeels()) {
188+
if(lafi.getName().equals("Nimbus")) {
189+
UIManager.setLookAndFeel(lafi.getClassName());
190+
break;
191+
}
192+
}
187193
WebLookAndFeel.install();
188194
WebLookAndFeel.setDecorateFrames(true);
189195
WebLookAndFeel.setDecorateDialogs(true);

0 commit comments

Comments
 (0)