展开全部

我搞定了。

代码我改了:

import javax.swing.*;

public class Mac extends JFrame {

JFrame jf = new JFrame();

public Mac() {

this.setSize(400, 400);

JPanel panel= new JPanel();

panel.add(new JButton("OK"));

panel.add(new JList(new String[]{"adfaf","afweaf","纷纷为"}));

panel.setBorder(BorderFactory.createTitledBorder(

BorderFactory.createEtchedBorder(0), "Apple Look & Feels"));

this.add(panel,BorderLayout.CENTER);

}

public static void main(String args[]) {

try {

Mac mac = new Mac();

UIManager

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

SwingUtilities.updateComponentTreeUI(mac);

mac.setVisible(true);

} catch (Exception e) {

e.printStackTrace();

}

}

}

此外,从http://www.randelshofer.ch/quaqua/index.html下载plaf,我下的是Version7.3.3。下载可真32313133353236313431303231363533e78988e69d8331333262383034慢。下载完了解压。在你的项目里添加4个jar文件,就是dist文件夹下面的4个jar文件。弄好就OK了~~~慢慢欣赏吧~~

ff86bad3eaa02f78e700eb3a1d8132a2.png

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐