We can modify the look and feel of java GUI components,Here is an example used to implement the look and feel concepts in java programs.
Using below code we can set the operating systems look and feel.
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
public class LookAndFeel {
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
// UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
} catch (Exception ex) {
ex.printStackTrace();
}
SwingUtilities.invokeLater(new Runnable() {
public void run() {
createTheGUIComponents();
}
private void createTheGUIComponents() {
// Your implementation here…
}
});
}
}
We can also set the lot of GUI skins using substance.jar.
Download the latest substance.jar using below link
http://weblogs.java.net/blog/2005/12/29/swinging-java-ides
Add the above jar file in java classpath.
0 Comments:
Post a Comment