第一步、获得themepack的路径(比如说URL)
假设opusOSOlivethemepack.zip(从http://www.javootoo.com/可以下载更多的themepack)放在 当前应用程序的执行目录下的lookandfee文件夹下面那么可以这样子写 File file=new File("");
URL url=new URL(file.toURL()+"/lookandfeel/opusOSOlivethemepack.zip");
第二步、使用themepack
Skin skin = SkinLookAndFeel.loadThemePack(url);
SkinLookAndFeel.setSkin(skin);
UIManager.setLookAndFeel("com.l2fprod.gui.plaf.skin.SkinLookAndFeel");
博客介绍了themepack的使用步骤。首先要获得themepack的路径,如假设opusOSOlivethemepack.zip在当前应用程序执行目录下的lookandfee文件夹,可通过File和URL对象获取路径;接着使用themepack,通过SkinLookAndFeel加载并设置皮肤,最后设置UIManager的外观。
6477

被折叠的 条评论
为什么被折叠?



