0

NimbusLookAndFeel extends SynthLookAndFeel but does it supports loading properties from xml like SynthLookAndFeel does?

Is the XML settings format the same?

mKorbel
  • 109,525
  • 20
  • 134
  • 319
user590444
  • 4,252
  • 8
  • 36
  • 43

1 Answers1

1

Yes, but not 100% certain that you'll arrive at the same result as when using the NimbusLookAndFeel as-is. You'll find a skin.laf file in the JDK source which is essentially the XML file that Nimbus uses to bootstrap itself.

However this file is not read at runtime, rather it is read when the JDK is build and from that some source code is generated that become package-private classes that NimbusLookAndFeel then uses. You can see these generated classes if you browse the contents of your rt.jar file.

From what I understand this technique is used because it has performance advantages. The skin.laf is a pretty huge XML file and if it were to be parsed everytime Nimbus L&F is activated it probably wouldn't be good. Just my guess.

What I'm trying to say is: Nimbus L&F doesn't use the load() methods itself. It has another way of bootstrapping itself.

peterh
  • 18,404
  • 12
  • 87
  • 115