I'm having a problem with the java look and feel.
I've set it to the Nimbus skin with the following code in my main method:
public class Main
{
public static void main(String[] args)
{
try
{
boolean found = false;
for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels())
{
if ("Nimbus".equals(info.getName()))
{
UIManager.setLookAndFeel(info.getClassName());
found = true;
break;
}
}
if (!found) UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
UIManager.put("AuditoryCues.playList", UIManager.get("AuditoryCues.allAuditoryCues"));
}
catch (Exception e) {}
Manager mngr = new Manager();
mngr.setSize(1000, 600);
Utils.centerWindow(mngr);
mngr.setVisible(true);
}
}
And it gives me this kind of windows:
As you can see, the JInternalFrames are correctly skinned but the main window is not!
How can I apply the theme to this window too?
Thanks.
Manager
is a simple JFrame
with the following code:
public class Manager extends JFrame
{
public Manager()
{
initComponents();
}
private void initComponents()
{
setDefaultCloseOperation(3);
setTitle("My window");
setIconImage(ImageLoader.getIcon().getImage());
// My components go here
pack();
}
}