1.主题统一

This commit is contained in:
JianGuo 2024-06-14 14:01:08 +08:00
parent 52a99a220a
commit 34699ff89d
2 changed files with 5 additions and 3 deletions

View File

@ -28,6 +28,7 @@
<groupId>com.formdev</groupId>
<artifactId>flatlaf</artifactId>
<version>3.4.1</version>
<classifier>no-natives</classifier>
</dependency>
</dependencies>

View File

@ -1,6 +1,6 @@
package com.xiaoliu;
import com.formdev.flatlaf.FlatDarculaLaf;
import com.formdev.flatlaf.themes.FlatMacLightLaf;
import com.xiaoliu.window.MainWindow;
import lombok.extern.slf4j.Slf4j;
@ -12,8 +12,9 @@ public class Main {
public static void main(String[] args ){
log.info("服务启动中...");
try {
UIManager.setLookAndFeel(new FlatDarculaLaf());
} catch (UnsupportedLookAndFeelException e) {
UIManager.setLookAndFeel(new FlatMacLightLaf());
//UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
log.error("UnsupportedLookAndFeelException: {}", e.getMessage());
}
SwingUtilities.invokeLater(() -> new MainWindow().setVisible(true));