How to Apply Synthetica Look And Feel to JFrame in Netbeans
Here I am going to explain how to apply Synthetica Look And Feel to a JFrame in Netbeans,in the previous tutorial I was explained how to apply Nimbus Look and Feel Java Swing to a JFrame.You will be able to apply
- SyntheticaSkyMetallicLookAndFeel
- SyntheticaBlueMoonLookAndFeel
- SyntheticaBlueIceLookAndFeel
- SyntheticaWhiteVisionLookAndFeel
- and SystemLookAndFeel which will your OS look and feel.
To apply Synthetica look and feel you must add Synthetica libraries to your project class path.
This code will remove your current look and feel which will help to apply new look and feel clearly.
UIManager.removeAuxiliaryLookAndFeel(UIManager.getLookAndFeel());
To apply new look and feel you must use this code snip which will update all Component with new look and feel
SwingUtilities.updateComponentTreeUI(this);
Look and Feel change function
private void changeLookandFeel() {
try {
UIManager.removeAuxiliaryLookAndFeel(UIManager.getLookAndFeel());
SyntheticaLookAndFeel.setWindowsDecorated(false);
UIManager.setLookAndFeel(UIMANAGER_STRING);
// for (int i = 0; i < LookAndFeel.getFrames().length; ++i) {
// SwingUtilities.updateComponentTreeUI(LookAndFeel.getFrames()[i]);
// SwingUtilities.updateComponentTreeUI(this);
// }
SwingUtilities.updateComponentTreeUI(this);
} catch (Exception ex) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
e.printStackTrace();
}
}
}
Synthetica Blue Moon Look And Feel













11 comments:
Hi Chathura,
Nice blog! Is there an email address I can contact you in private?
Indeed a nice tip. this can also be a good question one can ask to Java Swing developer, worth including in my list of Swing interview questions.
Hi Nikos I am on google plus you can add me..
Chatura it show an exception that class not found..... in netbeans
What is the JDK version is it 7.0 ? use JDK 6
Ok i'll try to use JDK 6 could you give me your email id to cantact you
Thanks chatura it works in jdk 6 thankx alot
this article is really helpful Thank you man Thanks a lot :)
i want to add this theams for JDK version is it 7.0,can u help me
@ Sajini Synthetica Standard Look and Feel support Java 1.5 or above
Post a Comment