From 34699ff89d0d6a52cfd2e76f377b2f1e1c44efd5 Mon Sep 17 00:00:00 2001 From: JianGuo Date: Fri, 14 Jun 2024 14:01:08 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=B8=BB=E9=A2=98=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FileTransferClient/pom.xml | 1 + FileTransferClient/src/main/java/com/xiaoliu/Main.java | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/FileTransferClient/pom.xml b/FileTransferClient/pom.xml index ad61382..67c2498 100644 --- a/FileTransferClient/pom.xml +++ b/FileTransferClient/pom.xml @@ -28,6 +28,7 @@ com.formdev flatlaf 3.4.1 + no-natives diff --git a/FileTransferClient/src/main/java/com/xiaoliu/Main.java b/FileTransferClient/src/main/java/com/xiaoliu/Main.java index f617924..fcd4435 100644 --- a/FileTransferClient/src/main/java/com/xiaoliu/Main.java +++ b/FileTransferClient/src/main/java/com/xiaoliu/Main.java @@ -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));