hi everybody

I don't know how to change look and feel in java program. I tried smth like that

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());



but in both cases the main frame looked the same.

Here is my whole source

class MyClass {

public static void main(String args[]) {
JFrame mainFrame = new JFrame("Yabba dabba doo");
mainFrame.addWindowListener(new WindowAdapter(){
public void windowClosing( WindowEvent e) { System.exit(0); }
});

try {
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
//UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception exc) {
System.err.println("Error loading L&F: " + exc);
}

mainFrame.pack();
mainFrame.setSize(600,200);
mainFrame.setVisible(true);
}
}



Please somebody help me with an example how to change between L&F.

thnx Seyo