Search code examples
javalook-and-feelnetbeans6.5

Adding look and feel into java application


I am working with the NetBeans 6.5 IDE.

I downloaded a look and feel jar file and added it NetBeans by palette manager.

How do I use it in my application?


Solution

  • Thanks for your reply. By using the below code we can get all look and feel class names.

    UIManager.LookAndFeelInfo[] lookAndFeelInfos = UIManager.getInstalledLookAndFeels();
        for (int i = 0; i < lookAndFeelInfos.length; i++) {
            UIManager.LookAndFeelInfo lookAndFeelInfo = lookAndFeelInfos[i];
    
            //
            // Get the name of the look and feel
            //
            String name = lookAndFeelInfo.getName();
            System.out.println("name = " + name);
    
            //
            // Get the implementation class for the look and feel
            //
            String className = lookAndFeelInfo.getClassName();
            System.out.println("className = " + className);
        }