1.主题统一
This commit is contained in:
parent
52a99a220a
commit
34699ff89d
|
@ -28,6 +28,7 @@
|
|||
<groupId>com.formdev</groupId>
|
||||
<artifactId>flatlaf</artifactId>
|
||||
<version>3.4.1</version>
|
||||
<classifier>no-natives</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue