Giter VIP home page Giter VIP logo

flatlaf-dashboard's Introduction

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

flatlaf-dashboard's People

Contributors

dj-raven avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.