Skip to content

JLabel with rounded border corners and background #842

@poce1don

Description

@poce1don

Karl, congratulations on Flatlaf, and thanks for giving the swing a new life.

This personalization

label.setOpaque(true);
label.putClientProperty(FlatClientProperties.STYLE, 
 "background: #00498C; foreground: #A9D1FF; border: 5,10,5,10, #E1FF68, 1.0f, 30;");

Results in
shot

In the FlatLabelUI class could also have its update() method implementing it as it did in FlatPanelUI, and thus ensure that the color of the background would be rounded, as we see in a JPanel with that same personalization.

I can currently resolve through Jlabel's paintComponent(), but if there was a native feature on FlatLaf, it would be pretty cool, because JLabel with rounded corners allows us to create very stylish and modern titles.

What do you think of the idea?

Thank you, and see you soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions