I have downloaded a look and feel for java. it is Quaqua. it is downloaded in ZIP format. my question is how to add this look and feel to my program? i am using NetBeans 8. i googled and found not suitable result. So tell me proper procedure. Thanks.
Asked
Active
Viewed 331 times
-5
-
See http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/index.html – Paul Samsotha Sep 11 '14 at 11:21
-
1"So tell me proper procedure". No, we won't, unless you tell us what you *actually tried*. – nanofarad Sep 11 '14 at 11:21
1 Answers
2
You add a jar file to classpath like any other lib and and before showing your JFrame you set lnf like this:
UIManager.setLookAndFeel(quaqualnf);
...
JFrame frame = ...
If you bothered to look on the dev guide, you'd have found this:
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
...
}
}

ioreskovic
- 5,531
- 5
- 39
- 70