Java Swing LaF doesnt apply the theme to executable Jar app

33 Views Asked by At

im trying to use a custom theme im my java app, when i run it in netbeans, the themes apply like so,

with theme applied

however, when i build and compiled the app and run the executable jar file, this is what i get

executable jar file

i tried to modify the main function to recognize and use the custom theme

public static void main(String args[]) throws UnsupportedLookAndFeelException {
        IntelliJTheme.setup(LoginPage.class.getResourceAsStream("/carbon.theme.json"));
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new LoginPage().setVisible(true);
            }
        });
    }

i want to apply the theme at the executable file to make it presentable

0

There are 0 best solutions below