java美化
發布時間: 2023-01-24 21:04:51
⑴ 怎樣美化java GUI中的按鈕啊
UIManager.setLookAndFeel(new com.sun.java.swing.plaf.windows.WindowsLookAndFeel());
用這句話就可以了!
括弧內還可以用其他的!
可以用以下這個方法來查看你本機的主題
public static void getSystemLookAndView()
{
UIManager.LookAndFeelInfo []info=UIManager.getInstalledLookAndFeels() ;
for(UIManager.LookAndFeelInfo tem:info)
{
System.out.println(tem.getClassName());
}
}
⑵ 怎樣美化JAVA界面
使用Java的LookAndFeel設置,可以直接網路或Google一下,一般來說除非使用系統自帶外觀,否則需要下載jar包。
我比較推薦的是有Apple風格的QuaQuaLookAndFeel包,你可以查一下,下載後可直接放在工程中使用,很方便。
另外經常用到的較為權威的包是substance的外觀優化,有很多如金屬風格、復古風格等,
選擇SWT/JFace吧,RCP插件式開發的效率也不是awt/Swing可以比的
⑶ java界面美化包怎麼用
public static void main(String[] args) {
try {
UIManager.setLookAndFeel("com.jtattoo.plaf.mint.MintLookAndFeel");
} catch (Exception e) {
e.printStackTrace();
熱點內容