我正在与在的NetBeans 6.5 IDE

工作

我下载了一个外观和感觉jar文件和调色板经理加入它的NetBeans。

我如何使用它在我的应用程序?

有帮助吗?

解决方案 2

感谢您的答复。 通过使用下面的代码中,我们可以得到所有的外观和感觉的类名称。

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);
    }

其他提示

您可以按照有关本教程孙设置L&F在爪哇

  

您甚至可以经过该程序的GUI是可见的改变L&F与setLookAndFeel。结果   为了使现有的组件反映新的L&F,每顶层容器调用SwingUtilities updateComponentTreeUI方法一次。结果   这时,你可能希望调整每个顶层容器,以反映其包含的组件的新尺寸。例如:

UIManager.setLookAndFeel(lnfName);
SwingUtilities.updateComponentTreeUI(frame);
frame.pack();
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top