Viewing entries tagged with 'Look and Feel'
This release comes with fantastic news for Windows 10 users/developers.
Native window decorations on Windows 10
This enables dark frame/dialog title bar and embedded menu bar with all JREs while still having:
- native Window 10 border drop shadows
- native Window 10 resize functionality
- Windows 10 snapping functionality
- native Windows 10 system window menu when right-clicking on title bar or left-clicking on application icon


This feature is enabled by default on Windows 10.
If you don't like/want it, you can disable it with:
UIManager.put( "TitlePane.useWindowDecorations", false );
It is also possible to disable only the embedded menu bar (and keep the dark title pane) with:
UIManager.put( "TitlePane.menuBarEmbedded", false );
It is also possible to disable this on command line with following VM options:
-Dflatlaf.useWindowDecorations=false
-Dflatlaf.menuBarEmbedded=false
If you have following code in your app, you can remove it (no longer necessary):
// enable window decorations
JFrame.setDefaultLookAndFeelDecorated( true );
JDialog.setDefaultLookAndFeelDecorated( true );
Right aligned components in title pane with embedded menu bar on Windows 10
A usual way to add a component to the right side of the menu bar is to first add a horizontal glue component (Box.createHorizontalGlue()
) and then the own component. In a non-embedded menu bar it looks like this:

This now also works for embedded menu bars:

Example for adding own component to right side of menu bar:
JButton myButton = new JButton();
myButton.setIcon( new FlatSVGIcon( "myicon.svg" ) );
myButton.putClientProperty( "JButton.buttonType", "toolBarButton" );
myButton.setFocusable( false );
myMenuBar.add( Box.createHorizontalGlue() );
myMenuBar.add( myButton );
Unified backgrounds on Windows 10
To give your app an even more modern look, you can now use unified backgrounds for window title bar, menu bar and main content. This is similar to what IntelliJ IDEA does.

Enable with:
UIManager.put( "TitlePane.unifiedBackground", true );
You can try this in the FlatLafDemo app with "Options > Unified Title Bar".
Change log
See https://github.com/JFormDesigner/FlatLaf/releases/tag/1.1
2021-03-21
FlatLaf, Swing, Look and Feel, HiDPI
FlatLaf 1.0 is here 🎉 😀
Finally, after one and a half years of development, forty 0.x releases, 32
merged PRs, 191 closed issues and hundreds cups of coffee. 😄 It
took longer than expected. Looking back at all the features already implemented,
we could also name it 3.0. 😁
FlatLaf is a modern open-source cross-platform Look and Feel for Java Swing
desktop applications. It comes with more than 60 themes, scales on HiDPI
displays and runs on Java 8 or newer.
FlatLaf is already used in a lot of open-source and commercial applications. To
name only a few:
Apache NetBeans,
jclasslib,
KeyStore Explorer,
install4j,
DbVisualizer,
MagicPlot,
OWASP ZAP. Here is a
longer list.



Many, many thanks to the community. 🏆 🥇
🚀 Without your feedback, support, feature requests, bug reports
and pull requests, FlatLaf would not be there where it is now.
What's next? The development continues! Stay tuned... 😉
If you like FlatLaf, please give it a star @
GitHub. Thanks!
For more information and documentation visit
FlatLaf Home.
2021-02-26
FlatLaf, Swing, Look and Feel, HiDPI
In world where HiDPI displays and/or dark UIs are becoming more and more
popular, a good open-source Swing Look and Feel that supports both was missing.
We're filling this gap with FlatLaf, a new open-source look and feel for
Java Swing desktop applications, that scales perfectly on HiDPI displays and
is available in Light and Dark themes.
FlatLaf looks almost flat (no shadows or gradients), clean, simple and elegant.
With FlatLaf you get a single look and feel (LaF) for all platforms
(Windows, Mac and Linux). When using FlatLaf, it is no longer necessary to
support multiple LaFs in your application. E.g. Windows LaF on Windows, Mac OS
LaF on Mac and GTK LaF on Linux. You save a lot of time for testing and fixing
your UI on multiple platforms. And your application looks good on all platforms.


The FlatLaf 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
- scales on HiDPI displays
- cross-platform
- lightweight (under 200 KB; no dependencies)
- minimalistic, elegant and modern
- scalable vector icons
- runs on Java 8 or newer
For more information and documentation visit
FlatLaf Home.
2019-10-15
FlatLaf, Look and Feel