Hello,

I'm trying to change the look of java apps to something native.

In my first JFrame, I'm using:

try {
			//org.fife.plaf.VisualStudio2005.VisualStudio2005LookAndFeel
			//de.javasoft.plaf.synthetica.SyntheticaStandardLookAndFeel
			//com.jgoodies.looks.plastic.Plastic3DLookAndFeel
			//UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
                        UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		} catch (UnsupportedLookAndFeelException e) {
			e.printStackTrace();
		}
		getContentPane().setLayout(null);

Problem is that it looks like a mix of native/java, whereas the next JFrame is ok.

leiger commented: Included screenshot. +1

You need to set the Look & Feel before you create any frames! It seems that you are only doing this after having created the first one?

Try setting the L&F in your main method, before you create the first frame (put the main method in a different class, not the class that inherits from JFrame).

Thanks, leiger, works splendidly now!

I was thrown off by the fact that I'd set the layout in a secondary frame, yet my very first frame was looking differently too.

Glad it worked for you :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.