DJ-Raven / flatlaf-dashboard

Java Swing Dashboard build with flatlaf look and feel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java Dashboard Light and Dark mode

This dashboard build by using java swing with flatlaf look and feel

Library use

  • flatlaf-3.2.jar
  • flatlaf-extras-3.2.jar
  • jsvg-1.2.0.jar
  • flatlaf-fonts-roboto-2.137.jar
  • swing-toast-notifications-1.0.1.jar

Sample code to show form

//  Application class from package raven.application
//  Parameter as java.awt.Component

Application.showForm(new PanelForm());

//  Set menu selection by index and subIndex

Application.setSelectedMenu(0, 0);

Menu Items

//  Modify this code in raven.menu.Menu.java

private final String menuItems[][] = {
    {"~MAIN~"}, //  Menu title
    {"Dashboard"},
    {"Email", "Inbox", "Read", "Compost"},
};

Menu Event

menu.addMenuEvent(new MenuEvent() {
    @Override
    public void menuSelected(int index, int subIndex, MenuAction action) {
        if (index == 1) {
            if (subIndex == 1) {
                Application.showForm(new FormInbox());
            } else if (subIndex == 2) {
                Application.showForm(new FormRead());
            }
        } else {
            action.cancel();
        }
    }
});

More custom you can apply flatlaf style properties

Screenshot

sample 1 sample 1
sample 1 sample 1

Update Note

  • [27-05-2023] Add menu item title use ~ sign around your title name : {"~YOUR TITLE NAME~"}
  • [28-05-2023] Update auto scale component and change Application.mainForm.showForm() to Application.showForm()
  • [29-05-2023] Update popup submenu item removed border and add drop shadow border
  • [31-05-2023] Update add login form
  • [31-05-2023] Update selection menu background and add method selected menu by index and subIndex
  • [17-06-2023] Update add Toast Notifications
  • [27-06-2023] Update add menu font properties for menu item and menu label Menu.item.font and Menu.label.font
  • [27-06-2023] Update menu support right to left by enable this code
  • [03-10-2023] Update add properties AccentControl.show to show and hide accent color toolbar

About

Java Swing Dashboard build with flatlaf look and feel


Languages

Language:Java 100.0%