FlatLaf | Swing Look and Feel ( with Darcula/IntelliJ themes support | Theme library

 by   JFormDesigner Java Version: 3.2.5 License: Apache-2.0

kandi X-RAY | FlatLaf Summary

kandi X-RAY | FlatLaf Summary

FlatLaf is a Java library typically used in User Interface, Theme applications. FlatLaf has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. However FlatLaf build file is not available. You can download it from GitHub, Maven.

FlatLaf is a modern open-source cross-platform Look and Feel for Java Swing desktop applications. It looks almost flat (no shadows or gradients), clean, simple and elegant. FlatLaf comes with Light, Dark, IntelliJ and Darcula themes, scales on HiDPI displays and runs on Java 8 or newer. The look is heavily inspired by Darcula and IntelliJ themes from IntelliJ IDEA 2019.2+ and uses almost the same colors and icons.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              FlatLaf has a medium active ecosystem.
              It has 2470 star(s) with 212 fork(s). There are 38 watchers for this library.
              There were 6 major release(s) in the last 12 months.
              There are 63 open issues and 516 have been closed. On average issues are closed in 20 days. There are 8 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of FlatLaf is 3.2.5

            kandi-Quality Quality

              FlatLaf has 0 bugs and 0 code smells.

            kandi-Security Security

              FlatLaf has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              FlatLaf code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              FlatLaf is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              FlatLaf releases are available to install and integrate.
              Deployable package is available in Maven.
              FlatLaf has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 62406 lines of code, 4635 functions and 405 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed FlatLaf and discovered the below as its top functions. This is intended to give you an instant insight into FlatLaf implemented functionality, and help decide if they suit your requirements.
            • Called when the tab has changed .
            • Sets the default values for the given theme .
            • Apply properties to the UI defaults .
            • Initialize Mac input maps .
            • Paint the row .
            • Get all keys from the editor .
            • Handles mouse wheel move .
            • update the themes list
            • Paint the shadow .
            • Initialize the components .
            Get all kandi verified functions for this library.

            FlatLaf Key Features

            No Key Features are available at this moment for FlatLaf.

            FlatLaf Examples and Code Snippets

            No Code Snippets are available at this moment for FlatLaf.

            Community Discussions

            QUESTION

            Java application not using dark title bars even though have implemented NSRequiresAquaSystemAppearance = False
            Asked 2022-Mar-30 at 08:27

            I have implemented a Dark Mode for my Java application (using flatlaf) but the title bar has light appearance even when MacOS itself it set to use Dark Mode. The possible solution is to set NSRequiresAquaSystemAppearance to false in the Info.plist file. I have done this as part of building the appbundle (with TheInfiniteKind fork of appbundler) but it is not working for me

            This is the contents of the generated Info.plist file

            ...

            ANSWER

            Answered 2022-Mar-30 at 08:25

            Things seem to have moved on, I found this issue fixed in Java 14 - https://bugs.openjdk.java.net/browse/JDK-8235363

            I found setting

            Source https://stackoverflow.com/questions/71673586

            QUESTION

            Replacement LayoutManager for JXStatusBar Constraints or way to use with JPanel
            Asked 2022-Mar-06 at 13:50

            I am using swingx library, on Windows I am now moving towards using the Flatlaf light and dark look and feel on all platforms

            This looks fine on MacOS, but on Windows the status bar looks like it did with Windows look and feel and doesn't look right.

            It is because I'm using the swingx JXStatusBar component and this has some look and feel enhancements including some Windows specific images used for the background

            e.g. swingx\swingx-core\src\main\resources\org\jdesktop\swingx\plaf\windows\resources\silver-statusbar-left.png

            Trying to change the background colour of the component or the labels I add to it has no effect.

            So I thought the best thing to do was move away from using JXStatusBar and just use a JPanel, but continue adding the components in same way using JXStatusBar.Constraint

            ...

            ANSWER

            Answered 2022-Mar-06 at 13:50

            Add flatlaf-swingx.jar to your project, then JXStatusBar works fine with FlatLaf:

            See FlatLaf addon for SwingX and issue #492

            Source https://stackoverflow.com/questions/71350234

            QUESTION

            Proguard - Can't read StackUtilsImpl.class
            Asked 2021-Dec-26 at 22:39

            I'm having an error while compiling proguard. I'm using flatlaf-1.6.4.jar for GUI Java Aplication

            ...

            ANSWER

            Answered 2021-Dec-26 at 22:39

            You haven't provided any details about your environment, but based on the error message ("Unsupported class version number [53.0] (maximum 52.0, Java 1.8)") it looks like your code was compiled using JRE 9 (i.e. version 53.0).

            There is an old Proguard feature request on this. See #181 Java 9 major number 53 support:

            Proguard does not support Java 9 class file format. The major version number for the class file in Java 9 is 53 and in Java 8 it was 52. Please enhance Proguard to support Java 9 class files.

            The request was submitted on 12/21/16, and closed on 2018-03-29. Presumably you are using ProGuard 5.x (or earlier), right? If so, your solution is to use Proguard 6.0 or later. From the Proguard 6.0 release documentation:

            Added backporting and support for Java 9 code

            However, if you are already using a version of Proguard > 5.x then update your question to provide full details of the compiled version of your code, and your versions of Proguard, Java and NetBeans.

            Also see the old SO question Error Proguard Unsupported class version number. Though not a duplicate of your question, it details a similar issue on earlier versions of Java and Proguard.

            Source https://stackoverflow.com/questions/70480035

            QUESTION

            Setting the Color of the Title Bar with Netbeans Platform Application (FlatLaF)
            Asked 2021-Dec-05 at 14:08

            I'm currently working on a Netbeans Platform application that uses com.formdev.flatlaf.FlatLightLaf as the Look and Feel. The application is using Java 11 and running under Windows 10.

            I would now like to change the color of the TitlePane. Changing the color of specific elements (like jPanels etc.) globally for the entire application can be done by changing properties within the UIManager. So I tried changing many of the background-color specific settings from UIManager.getDefaults() as well as UIManager.getLookAndFeelDefaults(). For example changing the TitlePane.background property to something like UIManager.put("TitlePane.background", new ColorUIResource(100, 100, 100));. However none of the dozens of properties I changed worked at all.

            The color can be changed though as evidenced by the changed color of the TitlePane when using the com.formdev.flatlaf.FlatDarkLaf (darkmode).

            If anyone has any idea which properties need to be changed in order to change the color of the title pane in a Netbeans Platform application I would very much appreciate any form of help!

            ...

            ANSWER

            Answered 2021-Aug-24 at 06:46

            I believe I found the culprit. In a recent release of Netbeans the option to set "TitlePane.unifiedBackground" for FlatLaF was introduced. However when setting UIManager.put("TitlePane.unifiedBackground", true); the problem described above will occur and I effectively can't set the background color of the TitlePane.

            As seen in the method updateUnifiedBackground() of class FlatLFCustoms(https://github.com/apache/netbeans/blob/12.4/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLFCustoms.java) in the Netbeans source code, the color of the titlePane should be set by adjusting the property "Panel.background". This however doesn't seem to work properly.

            A workaround seems to be to set UIManager.put("TitlePane.unifiedBackground", false); and then just set the "TitlePane.background" to the desired color. If you still want the unified TitlePane look you can achieve that by also setting "Panel.background" and "Toolbar.background" to the same color.

            In effect this will look identical to setting the unifiedBackground for the TitlePane only now you can change the color. Hope this helps someone who stumbles upon the same Problem.

            Source https://stackoverflow.com/questions/68799747

            QUESTION

            Customize theme color in Flatlaf Look and Feel
            Asked 2021-Nov-14 at 10:00

            I'm using the Flatlaf Look and Feel for my GUI in Java swing. There's a pre-made theme in Flatlaf which I imported, but I'd like to change one of the colors in the color scheme slightly. It's the color that is used to highlight JComponents and selected tabs. Is there any way to do this?

            The standard way to customize a L&F is:

            ...

            ANSWER

            Answered 2021-Nov-14 at 10:00

            I don't know how to do this in FlatLaf, but there is another library called material-ui-swing that gives you more power on the material theme, and after it is the library that works with the UIManager.

            You can do somethings like that:

            Source https://stackoverflow.com/questions/68685973

            QUESTION

            How to build gradle projects completely offline?
            Asked 2021-Sep-13 at 14:01

            Environment: Linux + JDK 11 + Gradle 5.0 I have several gradle projects which must build from sources without Internet connection/ For example this one git clone --depth 1 --branch 3.0.0 https://github.com/bobbylight/RSyntaxTextArea.git for that first of all I built this project online then copy ~/.gradle to $PROJECT_DIR/grdl , next I want to test this build offine. I perform gradle --stop , clear whole ~/.gradle directory then turn off Internet and run following script:

            ...

            ANSWER

            Answered 2021-Sep-13 at 14:01

            I think you are hitting this issue: https://github.com/gradle/gradle/issues/1338

            That is, cache items are non relocatable. Copying the whole ~/.gradle folder may not be enough, especially if ~ resolves to a different path than in the original machine (i.e. different user). The full path needs to be exactly the same (with Gradle 5.0).

            The issue suggests however that version 6.1 makes the cache relocatable, so perhaps you'll have more luck with a recent version (7.2 is the latest at this point in time).

            EDIT: The release notes and these docs confirm that the cache can be copied across deployments as of version 6.1.1.

            Source https://stackoverflow.com/questions/69163452

            QUESTION

            JLabel icon's color only changes when the .setText() is called
            Asked 2021-Jun-27 at 12:27

            I'm using Ikonli Packs for my element icons and adding it to a JLabel works fine.

            I want to implement a hover feature but when I do, nothing happens unless I try to call the .setText() method of my JLabel.

            I thought it might be obligatory to have text in order to detect the cursor, but the JLabel doesn't have text initially, yet it still detects it, but as I mentioned, if I don't have the .setText() as well, the icon color will not change.

            There are many examples here and on other websites on how to implement hover for labels/buttons/etc., but they all have text in one shape or form.

            There's also this example which hovers over images, but yet again, changes the text, not the images themselves.

            (The elements seen in the MyForm.java file have been added via the Swing Palette.)

            MyForm.java ...

            ANSWER

            Answered 2021-Jun-27 at 12:27

            As suggested by Andrew Thompson, I used a JButton instead of JLabel.

            Source https://stackoverflow.com/questions/68148984

            QUESTION

            JButtons in JTable cell change shape on row selection
            Asked 2021-May-24 at 04:38

            I have a single cell (column) per row based table and the cell is a panel with 2 buttons on it. TableCellRenderer and TableCellEditor are implemented correctly to allow render and edit the cell. But when i click the row or even the button, the shape of the buttons change. It looks like the size of the button shrinks to fit the button text. Please see the attached images.

            If I set a preferred size of the buttons then the size doesn't seem to change but the button text shift towards right. Below is the code of the table cell panel. Running this panel from a main in the same class like shown below dosn't show this behavior. This behavior is only visible when using this panel as a cell in the single column table row. Don't know which property of what to set/change.

            ...

            ANSWER

            Answered 2021-May-24 at 04:38

            According to the source code, the border inset of the table cell editor is 0 according to the FlatBorder specification.

            com/formdev/flatlaf/ui/FlatBorder.java

            Source https://stackoverflow.com/questions/67657036

            QUESTION

            Update components border/insets on user scale change
            Asked 2021-Apr-18 at 12:40

            I'm currently using FlatLaf UI as look&feel for my Swing application.
            FlatLaf offers a user scale mechanism based on the font size, e.g.:

            ...

            ANSWER

            Answered 2021-Apr-18 at 12:40

            A neat solution is extending the standard Swing components, e.g.

            Source https://stackoverflow.com/questions/67148216

            QUESTION

            Java JFrame weird behavior when resizing with setWindowDecorationStyle(JRootPane.FRAME);
            Asked 2021-Apr-05 at 20:54

            I am creating a JFrame, using a custom look and feel named FlatLaf. But I am experiencing weird behavior when I resize the window. I can replicate the exact same problem with this snippet:

            ...

            ANSWER

            Answered 2021-Apr-05 at 20:54

            The problem is when I resize from the left and the top of the frame, it starts to move in that direction

            This effect happens because you are setting the minimum size of the JFrame, together with the fact that you clear the frame decorations. So don't set the minimum size, or just leave the decorations enabled. If you leave the decorations enabled and still set the minimum size, then the user will be able to resize the frame until it reaches the minimum corresponding dimension where, instead of moving, the frame will stay in place.

            As for the title bar, in case you need all of its good characteristics (such as the 3 buttons on the right, the title and icon of the frame on the left and the bar in the middle which can be actually dragged by the user to move the frame), but you also want it to have a specific color, then don't undecorate it and only change the color of the title bar component, which can be done like so:

            Source https://stackoverflow.com/questions/66957686

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install FlatLaf

            FlatLaf binaries are available on Maven Central.
            FlatLaf snapshot binaries are available on [Sonatype OSSRH](https://oss.sonatype.org/content/repositories/snapshots/com/formdev/flatlaf/). To access the latest snapshot, change the FlatLaf version in your dependencies to <version>-SNAPSHOT (e.g. 0.27-SNAPSHOT) and add the repository https://oss.sonatype.org/content/repositories/snapshots/ to your build (see [Maven](https://maven.apache.org/guides/mini/guide-multiple-repositories.html) and [Gradle](https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:declaring_custom_repository) docs).
            To use FlatLaf, add following code to your main method before you create any Swing component:.

            Support

            For more information and documentation visit [FlatLaf Home](https://www.formdev.com/flatlaf/):.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
            Maven
            Gradle
            CLONE
          • HTTPS

            https://github.com/JFormDesigner/FlatLaf.git

          • CLI

            gh repo clone JFormDesigner/FlatLaf

          • sshUrl

            git@github.com:JFormDesigner/FlatLaf.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Theme Libraries

            bootstrap

            by twbs

            tailwindcss

            by tailwindlabs

            Semantic-UI

            by Semantic-Org

            bulma

            by jgthms

            materialize

            by Dogfalo

            Try Top Libraries by JFormDesigner

            markdown-writer-fx

            by JFormDesignerJava

            swing-jgoodies-forms

            by JFormDesignerJava

            swing-beansbinding

            by JFormDesignerJava

            swing-jgoodies-looks

            by JFormDesignerJava

            swing-tablelayout

            by JFormDesignerJava