System Properties
Java system properties can be used to change some behavior of FlatLaf.
They can be either passed at command line to any application that uses FlatLaf:
$ myapp -Dflatlaf.animation=false
Or set in Java code:
System.setProperty( "flatlaf.animation", "false" );
List of system properties used in FlatLaf:
Property Name | Description | Allowed Values | Default |
---|---|---|---|
flatlaf.uiScale | Specifies a custom scale factor used to scale the UI.
If Java runtime scales (Java 9 or later), this scale factor is applied on top
of the Java system scale factor. Java 8 does not scale and this scale factor
replaces the user scale factor that FlatLaf computes based on the font.
To replace the Java 9+ system scale factor, use system property sun.java2d.uiScale ,
which has the same syntax as this one.Since FlatLaf 1.1.2: Scale factors less than 100% are allowed. |
e.g. 1.5 , 1.5x , 150% or 144dpi (96dpi is 100%) |
none |
flatlaf.uiScale.enabled | Specifies whether user scaling mode is enabled. | false and true |
true |
flatlaf.uiScale.allowScaleDown since v1.1.2 |
Specifies whether values smaller than 100% are allowed for the user scale factor. | false and true |
false |
flatlaf.useUbuntuFont | Specifies whether Ubuntu font should be used on Ubuntu Linux. By default, if not running in a JetBrains Runtime, the Liberation Sans font is used because there are rendering issues (in Java) with Ubuntu fonts. | false and true |
false |
flatlaf.useWindowDecorations | Specifies whether native window decorations should be used
when creating JFrame or JDialog .Setting this to true forces using native window decorations
even if they are not enabled by the application.
Setting this to false disables using native window decorations.
This system property has higher priority than client property
JRootPane.useWindowDecorations and
UI default TitlePane.useWindowDecorations .(requires Windows 10/11) |
false and true |
none |
flatlaf.useJetBrainsCustomDecorations | Deprecated: No longer used since FlatLaf 3.3. Specifies whether JetBrains Runtime custom window decorations should be used when creating JFrame or JDialog .Requires that the application runs in a JetBrains Runtime (based on OpenJDK). Setting this to false disables using JetBrains Runtime custom window decorations.
Then FlatLaf native window decorations are used.(requires Windows 10/11) |
false and true |
false (since since v2; was true in since v1) |
flatlaf.menuBarEmbedded | Specifies whether the menu bar is embedded into the window title pane
if window decorations are enabled. Setting this to true forces embedding.
Setting this to false disables embedding.This system property has higher priority than client property JRootPane.menuBarEmbedded and
UI default TitlePane.menuBarEmbedded .(requires Windows 10/11) |
false and true |
none |
flatlaf.useNativeLibrary since v3.2 |
Specifies whether FlatLaf native library should be used. Setting this to false disables loading native library,
which also disables some features that depend on the native library. |
false and true |
true |
flatlaf.nativeLibraryPath since v2 |
Specifies a directory in which the FlatLaf native libraries are searched for. The path can be absolute or relative to current application working directory. This can be used to avoid extraction of the native libraries to the temporary directory at runtime.
If the value is
If the native library can not be loaded from the given path (or via The file names of the native libraries must be either:
Note: Since FlatLaf 3.1 it is recommended to download the
FlatLaf native libraries from Maven central and distribute them with your
application in the same directory as |
absolute or relative path | none |
flatlaf.animation | Specifies whether animations are enabled. | false and true |
true |
flatlaf.useRoundedPopupBorder since v3.5.2 | Specifies whether native rounded popup borders should be used (if supported by operating system). (requires Windows 11 or macOS) |
false and true |
true ; except on macOS 14.4+ where it is false |
flatlaf.useTextYCorrection | Specifies whether vertical text position is corrected when UI is scaled on HiDPI screens. | false and true |
true |
flatlaf.updateUIOnSystemFontChange since v2.5 | Specifies whether FlatLaf updates the UI when the system font changes.
If true , SwingUtilities.updateComponentTreeUI(java.awt.Component)
gets invoked for all windows if the system font has changed.
This is the similar to when switching to another look and feel (theme).
Applications that do not work correctly when switching look and feel,
should disable this option to avoid corrupted UI. |
false and true |
true |
flatlaf.useSubMenuSafeTriangle since v3.5.1 | Specifies whether safe triangle is used to improve usability of submenus. | false and true |
true |