GUI Look and Feel using Netbeans

Hello,I'm new to netbeans and i'm just wondering how i get my app to look like a Windows XP app. When using Matisse I can do a preview and it looks fine. But when i run the app it looks completely different.thanks,ken
[247 byte] By [kenjobonesnappera] at [2007-10-3 1:26:26]
# 1

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

icewalker2ga at 2007-7-14 18:23:56 > top of Java-index,Desktop,Developing for the Desktop...
# 2
Hey mate - thanks for that!cheersM
massenza at 2007-7-14 18:23:56 > top of Java-index,Desktop,Developing for the Desktop...
# 3

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.

CS_Student07a at 2007-7-14 18:23:56 > top of Java-index,Desktop,Developing for the Desktop...