讓swing使用蘋果風格的皮膚

1.先倒入jar包,quaqua.jar

  

2.JFrame.setDefaultLookAndFeelDecorated(true);

   try{

        UIManager.setLookAndFeel("ch.randelshofer.quaqua.QuaquaLookAndFeel");

      } catch(Exception e){

               e.printStackTrace();

         }

3.但是在windows下會出現

    Warning: ch.randelshofer.quaqua.util.Preferences failed to load Mac OS X global system preferences

java.io.FileNotFoundException: C:/Documents and Settings/new/Library/Preferences/.GlobalPreferences.plist (系統找不到指定的路徑。)
因爲quaqua,只工作在MacOS上,所以在windows上會出現這個問題,但基本不影響使用。

4.有一篇破解文章:http://hipo1983.blog.163.com/blog/#pn2

    

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章