//在窗体程序运行前,先加载皮肤,示例程序如下:
//先导入这两个包
import javax.swing.*;
import com.incors.plaf.alloy.AlloyLookAndFeel;
public class Program {
public static void main(String[] args)
{
//加载皮肤
try
{
//设置皮肤的主题(共有四种主题:default,bedouin,glass,acid)
AlloyLookAndFeel.setProperty("alloy.theme","acid");
//设置窗体或对话框的框架是否需要运用皮肤
AlloyLookAndFeel.setProperty("alloy.isLookAndFeelFrameDecoration","true");
//上面是最有用的两个属性,更多属性详见参考文档...
//加载皮肤外观
UIManager.setLookAndFeel(new AlloyLookAndFeel());
}
catch (UnsupportedLookAndFeelException ex)
{
JOptionPane.showMessageDialog(new JFrame(),"加载皮肤外观错误:"+ex);
}
//运行主窗体程序
new MyFrame();
}
}
//先导入这两个包
import javax.swing.*;
import com.incors.plaf.alloy.AlloyLookAndFeel;
public class Program {
public static void main(String[] args)
{
//加载皮肤
try
{
//设置皮肤的主题(共有四种主题:default,bedouin,glass,acid)
AlloyLookAndFeel.setProperty("alloy.theme","acid");
//设置窗体或对话框的框架是否需要运用皮肤
AlloyLookAndFeel.setProperty("alloy.isLookAndFeelFrameDecoration","true");
//上面是最有用的两个属性,更多属性详见参考文档...
//加载皮肤外观
UIManager.setLookAndFeel(new AlloyLookAndFeel());
}
catch (UnsupportedLookAndFeelException ex)
{
JOptionPane.showMessageDialog(new JFrame(),"加载皮肤外观错误:"+ex);
}
//运行主窗体程序
new MyFrame();
}
}