I have a jar that is loaded into a large Java platform.
There appears to be a custom LookAndFeel, which any Panels etc I create picks up.
Now I need to create a new jFrame, however, it doess NOT inherit the current lookandfeel.
How may I specify that it does this?
I tried this but it change all look and feels to something not too stable (visual glitches etc)
try {
// Set cross-platform Java L&F (also called "Metal")
UIManager.setLookAndFeel(
UIManager.getCrossPlatformLookAndFeelClassName());
}
catch (UnsupportedLookAndFeelException e) {
// handle exception
}
catch (ClassNotFoundException e) {
// handle exception
}
catch (InstantiationException e) {
// handle exception
}
catch (IllegalAccessException e) {
// handle exception
}
and when I look here:
UIManager.LookAndFeelInfo[] x = UIManager.getInstalledLookAndFeels();
it does NOT appear to have a custon LookAndFell in the list.
The main question is WHY does new jFrame NOT inherit the existing L&F?