Armond Avanes wrote:
> Hi Gurus,
>
> I'm just having some problem with LnFs! The scenario is that I want to load
> my application's look&feels dynamically. On the other hand I don't want to
> put the LnF jar/zip files in the classpath. So the first solution everyone
> may think of is to use URLClassLoader! I'm also doing so. Here is the L&F
> list (which can be found in app configuration file) :
>
> L&F-Name="MacOS"
> L&F-Package="it.unitn.ing.swing.plaf.macos.MacOSLookAndFeel"
> L&F-Resource="macos.jar"
> L&F-Name="Slaf" L&F-Package="com.memoire.slaf.SlafLookAndFeel"
> L&F-Resource="slaf.zip"
> ...
>
> And here is my code for loading and applying L&Fs :
>
> public void justATestMethod()
> {
> LookAndFeel lnf =
> (LookAndFeel)loadObjectFromResource("it.unitn.ing.swing.plaf.macos.MacOSLook
> AndFeel", "macos.jar");
I haven't done swing or runtime linking in a while, but I think
what happened is that you didn't load the rest of the Look and Feel
classes... Since the jar isn't in the classpath, things like the L&F's
JPanel replacement need to be linked explicitly, as well...
Sorry I can't be more explicit, right now, in what you have to do, but
hopefully this has helped somewhat.
-Andrew
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing