Weblaf
WebLaF is a fully open-source Look & Feel and component library written in pure Java for cross-platform desktop Swing applications.
Install / Use
/learn @mgarin/WeblafREADME
About
WebLaf is a fully open-source Look and Feel and component library written in pure Java for cross-platform desktop Swing applications. But it is also more than just that - it was made with intention of covering pretty much all aspects of UI development and at this point WebLaF includes an extensive set of features that goes beyond just Look and Feel or Swing component library.
To look at some features provided by WebLaF I recommend checking out the demo -
It is an executable JAR which you can run if you have JRE 6 or higher installed.
Features
- Fully reskinnable UI with a few predefined skins available out-of-the-box
- Wide range of popular custom components and features
- Advanced versions of all basic Swing components
- RTL orientation support for basic Swing and custom components
- Multi-language support for all UI elements
- Advanced API for providing UI element tooltips
- Advanced API for saving and restoring UI element states
- Advanced API for assigning hotkeys to UI elements and actions
- Countless utilities for convenient work with Swing APIs
- Application plugin support
- And more...
WebLaF project
- Fully open-source without any hidden proprietary code
- Have been developed for 10+ years
- Constantly growing and being improved
- Open for any suggestions and improvements
Quick start
Including WebLaF in your project (Maven)
If you are working with a Maven project you can simply add dependency for weblaf-ui module:
<dependency>
<groupId>com.weblookandfeel</groupId>
<artifactId>weblaf-ui</artifactId>
<version>1.2.14</version>
</dependency>
You can also use RELEASE or LATEST version instead of specific one.
Including WebLaF in your project (binaries)
You can always find latest WebLaF binaries in releases section. These are the very same binaries that are available through Maven, simply copied over to release section for convenience. Don't forget to download all dependencies in this case as well, they are always linked at the end of release notes.
If you aren't sure which binaries to use or which dependencies you might be missing - I recommend reading How to use WebLaF wiki article - it gives a short explanation on what each module does and requires.
Installing L&F
You can install WebLaF by simply calling WebLookAndFeel.install () or using one of standard Swing UIManager methods:
public class QuickStart
{
public static void main ( final String[] args )
{
// You should always work with UI inside Event Dispatch Thread (EDT)
// That includes installing L&F, creating any Swing components etc.
SwingUtilities.invokeLater ( new Runnable ()
{
@Override
public void run ()
{
// Install WebLaF as application LaF
WebLookAndFeel.install ();
// You can also specify preferred skin right-away
// WebLookAndFeel.install ( WebDarkSkin.class );
// You can also do that in one of the old-fashioned ways
// UIManager.setLookAndFeel ( new WebLookAndFeel () );
// UIManager.setLookAndFeel ( "com.alee.laf.WebLookAndFeel" );
// UIManager.setLookAndFeel ( WebLookAndFeel.class.getCanonicalName () );
// You can also configure other WebLaF managers as you like now
// StyleManager
// SettingsManager
// LanguageManager
// ...
// Initialize your application once you're done setting everything up
// JFrame frame = ...
// You can also use Web* components to get access to some extended WebLaF features
// WebFrame frame = ...
}
} );
}
}
That's it, now your application is using WebLaF.
Helpful articles
If you are new to Swing I recommend reading official Oracle articles about it first:
It is also important to understand how threading should be approached when working with Swing:
And if are new to WebLaF - I recommend checkin out these wiki articles first:
You can also check other wiki articles - there are quite a few available for different WebLaF components and features and they might save you a lot of time.
Sources
One last thing - I higly recommend having WebLaF sources attached to your IDE project. I'm doing my best to keep it clean and well-documented, so if you are wondering what some method does or how a feature works - peeking into the source code might be the easiest and fastest way to find out.
All of WebLaF source code is fully disclosed and available here on GitHub. Source code for releases is available in releases section and on Maven.
Dependencies
Even though I'm trying to keep the minimal amount of dependencies on 3rd-party libraries - WebLaF has quite a few at this point, so it is worth explaining which dependencies are used for what.
First, here are direct library dependencies you may find across different WebLaF modules:
-
Slf4j is one of the most commonly used logging tools and also offers nice options for bridging logging over to other popular tools, so this was the obvious choice. Originally I used older log4j verson, but moved on from it due to some restrictions and nuances.
-
XStream is used for serializing and deserializing objects to and from XML.
LanguageManageruses it to read translation files.SetingsManageruses it to store and read various settings.StyleManageruses it to read skins and skin extensions.IconManageruses it to read icon sets.PluginManageruses it to read plugin descriptors found in plugin JAR file. It is also used for variety of smaller features across WebLaF library. -
SVG Salamander is a standalone library providing loading, modification and rendering capabilities for SVG icons. Unlike Apache Batik it is way more lightweight and often able to render SVG icons slightly faster. It does have a few issues and I plan to make an abstract API for SVG icons support to allow choice between SVG Salamander and Apache Batkin in the future as explained in #337. It is also important to note that currently I'm using my own release of SVG Salamander fork that contains latest changes from original project and some minor non-API-breaking improvements added on top of it.
-
Java Image Scaling is a lightweight library used in
ImageUtilsexclusively for better downscaling of raster images in runtime. -
Jericho HTML parser is used in
HtmlUtilsfor rendering HTML into plain text. It is also used for quick tag lookup inStyleEditor. Potentially I might move this dependency as well asStyleEditorinto a separate module(s) as described in #336. -
RSyntaxTextArea is used for providing a styleable text area supporting syntax highlighting for multple programming languages. It is also used in
DemoApplicationfor styles and code preview and inStyleEditorfor style preview and editing.
There are also a few code pieces borrowed from other open-source projects:
-
TableLayoutimplementation is based on Clearthought source code, but has some minor modifications and fixes added on top of it. -
Various image filters and utilities found in
com.alee.graphics.filtersas well as strokes found incom.alee.graphics.strokespackages are based on JH Labs examples, but slightly cleaned up and with a few minor improvements added. -
Easinginterface implementations are base
Related Skills
node-connect
340.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.2kCommit, push, and open a PR


