Search code examples
javanetbeanslook-and-feelskin

change the default skin for applications in netbeans


I'm developing a Java application using Netbeans, and I want to change the default skin for the JFrame and buttons ...

I googled about it and I couldn't find anything.

In Visual Studio I was using SkinCrafter.

Is there any program or addon that allows me to change the default skin for applications in Netbeans ?


Solution

  • try {
            // Set System L&F
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        // or UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
        // or UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel")
    } 
    catch (Exception e) {
       // handle exception
    }
    

    Oracle site about

    for installed skins:

        for( LookAndFeelInfo info : UIManager.getInstalledLookAndFeels() ) {
            System.out.println( info.getName() );
        }