> > >     ClassLoader cl=renderer_class.getClassLoader();
> > >     Hashtable   tb=UIManager.getDefaults();
> > >
> > >     // regsiter the classloader
> > >     tb.put("ClassLoader",cl);
> > >
> > >     // preload
> > >     Enumeration e=tb.keys();
> > >     while(e.hasMoreElements())
> > >     {
> > >       String k=(String)e.nextElement();
> > >
> > >       if(k.endsWith("UI"))
> > >       {
> > >       Class uic=cl.loadClass((String)tb.get(k));
> > >       tb.put(uic.getName(),uic);
> > >       }
> > >     }
>
> In fact, the "Classloader" property in not always reconized (I mean used
> by Swing). If not, an other solution is to preload the UI classes. Only
> one of these solutions should be needed for a given JDK. But I can not
> tell you which JDK uses the LookAndFeel classloader, which one reconized
> the "Classloader" property and which needs the preload section. The only
> thing quite sure is that only JDK 1.2.0 needs the lookandfeel archive to
> be in the bootclasspath.

Thanks for your explanations.
If that's the case ("ClassLoader" property is not always recognized), so
you're quite right. The "preload" code should be present.
But when I tested it I got some ClassCastException's, it seems that some of
the KEYS are not STRING. The second problem was that loadClass(..) throwed
ClassNotFoundException for soem of the values.
I fixed both of the problem but I wanted to know whether or not catching
those exceptions and ignoring them will cause any problem later ?

Best Regards,
Armond

>
> Regards, Guillaume Desnoix
> --
> Author of SLAF, the simple look and feel
> http://www.memoire.com/guillaume-desnoix/slaf/
> (new release and themes soon available)
>
>


_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to