github JFormDesigner/FlatLaf 1.1

latest releases: 3.5.2, 3.5.1, 3.5...
3 years ago

Highlights

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

image

image

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:

image

This now also works for embedded menu bars:

image

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.

image

Enable with:

UIManager.put( "TitlePane.unifiedBackground", true );

You can try this in the FlatLafDemo app with "Options > Unified Title Bar".

Change log

New features and improvements

  • Windows 10 only:
    • Native window decorations for Windows 10 enables dark frame/dialog title bar
      and embedded menu bar with all JREs, while still having native Windows 10
      border drop shadows, resize behavior, window snapping and system window menu. (PR #267)
    • Custom window decorations: Support right aligned components in JFrame
      title bar with embedded menu bar (using Box.createHorizontalGlue()). (PR #268)
    • Custom window decorations: Improved centering of window title with embedded menu bar. (PR #268; issue #252)
    • Custom window decorations: Support unified backgrounds for window title bar,
      menu bar and main content. If enabled with UIManager.put( "TitlePane.unifiedBackground", true );
      then window title bar and menu bar use same background color as main content. (PR #268; issue #254)
  • JIDE Common Layer: Support JideButton, JideLabel, JideSplitButton, JideToggleButton and JideToggleSplitButton.
  • JIDE Common Layer: The library on Maven Central no longer depends on
    com.jidesoft:jide-oss:3.6.18 to avoid problems when another JIDE library
    should be used. (issue #270)
  • SwingX: The library on Maven Central no longer depends on
    org.swinglabs.swingx:swingx-all:1.6.5-1 to avoid problems when another
    SwingX library should be used.
  • Support running in JetBrains Projector.

Fixed bugs

  • IntelliJ Themes: Fixed text color of CheckBoxMenuItem and RadioButtonMenuItem
    in all "Arc" themes. (issue #259)

Don't miss a new FlatLaf release

NewReleases is sending notifications on new releases.