-5
我已經下載了java的外觀。它是Quaqua。它以ZIP格式下載。我的問題是如何將這種外觀和感覺添加到我的程序中?我正在使用NetBeans 8.我使用Google搜索,發現不合適的結果。 所以告訴我適當的程序。 謝謝。無法設置Java外觀和感覺
我已經下載了java的外觀。它是Quaqua。它以ZIP格式下載。我的問題是如何將這種外觀和感覺添加到我的程序中?我正在使用NetBeans 8.我使用Google搜索,發現不合適的結果。 所以告訴我適當的程序。 謝謝。無法設置Java外觀和感覺
您添加一個JAR文件到classpath中像任何其他lib和,並顯示您的JFrame之前設置的LNF這樣的:
UIManager.setLookAndFeel(quaqualnf);
...
JFrame frame = ...
如果你把眼光放在開發指南不屑,你會發現這個:
public class MyApplication {
public static void main(String[] args) {
// set system properties here that affect Quaqua
// for example the default layout policy for tabbed
// panes:
System.setProperty(
"Quaqua.tabLayoutPolicy","wrap"
);
// set the Quaqua Look and Feel in the UIManager
try {
UIManager.setLookAndFeel(
ch.randelshofer.quaqua.QuaquaManager.getLookAndFeel();
);
// set UI manager properties here that affect Quaqua
...
} catch (Exception e) {
// take an appropriate action here
...
}
// insert your application initialization code here
...
}
}
請參閱http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/index.html – 2014-09-11 11:21:28
「請告訴我適當的程序」。不,我們不會,除非你告訴我們你*實際上試過的*。 – hexafraction 2014-09-11 11:21:39