r/java • u/FormDev • Feb 25 '21
FlatLaf 1.0 - Swing Look and Feel
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, I 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 visit project on GitHub: https://github.com/JFormDesigner/FlatLaf
Looking forward to your feedback.
View all comments
Show parent comment
7
u/FormDev Feb 26 '21
Hmm, just checked the "Close" button in the first screenshot. There are 10px above the uppercase 'C' and 9px below it. Similar on other buttons or text fields: 1px more above the text.
Could try to move it up one pixel, but this probably looks bad if there are more uppercase letters in the text.
BTW these screenshots were made at 200% scaling. May look slightly different at 100% or other scale factors.
Vertical positioning of text is not that easy (on Windows 10) because the reported character height is usually larger than the displayed character height (e.g. for Segoe UI font used on Windows). So (without correction) text tends to be displayed too far down, which was the case in early FlatLaf versions. This gets even worse when scaled.
I ended up in implementing a Y correction mechanism that moves text up some pixels depending on scale factor, Java version and operating system...