FlatLaf - Flat Look and Feel
FlatLaf is a modern open-source cross-platform Look and Feel for Java Swing desktop applications.
It looks almost flat (no shadows or gradients), clean, simple and elegant. FlatLaf comes with Light, Dark, IntelliJ and Darcula themes, scales on HiDPI displays and runs on Java 8 or newer.
The look is heavily inspired by Darcula and IntelliJ themes from IntelliJ IDEA 2019.2+ and uses almost the same colors and icons.
Features
- Light, Dark, IntelliJ and Darcula themes
- macOS light and dark themes v3
- can use 3rd party themes developed for IntelliJ Platform
- custom window decorations with embedded menu bar (Window 10/11 and Linux only)
- highly customizable
- typography (predefined header and body fonts)
- scales on HiDPI displays
- cross-platform
- high quality
- lightweight (about 800 KB; no dependencies)
Sponsors
Platinum
Silver
Bronze
Demo
Run demo with java -jar flatlaf-demo-<version>.jar
(or double-click it).
Requires Java 8 or newer.
Download
FlatLaf binaries are available on Maven Central.
If you use Maven or Gradle, add a dependency with following coordinates to your build script:
groupId: com.formdev
artifactId: flatlaf
version: (see button below)
Otherwise download flatlaf-<version>.jar
here:
See also Native Libraries distribution for instructions on how to redistribute FlatLaf native libraries with your application.
Getting started
To enable FlatLaf, add following code to your main method before you create any Swing component:
FlatLightLaf.setup();
// create UI here...
or
try { UIManager.setLookAndFeel( new FlatLightLaf() ); } catch( Exception ex ) { System.err.println( "Failed to initialize LaF" ); } // create UI here...
Customizing
See Customizing page.
Themes
See Themes page.
Theme Editor
See Theme Editor page.
License
FlatLaf is open source licensed under the Apache 2.0 License
FlatLaf documentation on this website is Copyright © 2019-2024 FormDev Software GmbH. All rights reserved. Any other use or reproduction requires written consent of FormDev Software GmbH.
Source code
The FlatLaf source code is hosted on GitHub:
github.com/JFormDesigner/FlatLaf
Issues
Please report issues on GitHub:
github.com/JFormDesigner/FlatLaf/issues