If you are using xp then UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
If not this should do it UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"");
Make sure to call this method way before any GUI components are created, preferrably as the first thing in your main method
ICE
I have a very very strange with the XP look and feel.
I am using XP, and I am using the following to set the look and feel.
try {
//javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
javax.swing.UIManager.setLookAndFeel(javax.swing.UIManager.getSystemLookAndFeelClassName());
}
catch (Exception e) {
System.out.println(e);
}
I have tried both of the above and my problem is that when I run the application SOMETIMES no GUI appears. When I remove the look and feel, the GUI always appear. Please help me! I have tried adding the code before and after my main calls.