Re: Dynamically load laf



Now that I've tried this a bit more there seems to be a major problem
with this solution.
I load the Look and feel class properly and I can set the look and
feel, but it seems that the classes it depend on is causing problems.
What happens is this:
I set the laf to one from the "plugin directory", restart the
application
I get lots of exceptions when I restart the program. They are all very
similar and this is one example:

UIDefaults.getUI() failed: no ComponentUI class for:
javax.swing.JMenuBar[,0,0,0x0,invalid,alignmentX=null,alignmentY=null,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,margin=,paintBorder=true]
java.lang.Error
at javax.swing.UIDefaults.getUIError(UIDefaults.java:689)
at javax.swing.UIDefaults.getUI(UIDefaults.java:719)
at javax.swing.UIManager.getUI(UIManager.java:784)
at javax.swing.JMenuBar.updateUI(JMenuBar.java:125)
at javax.swing.JMenuBar.<init>(JMenuBar.java:93)
at se.wexiodisk.service.MainWindow.<init>(MainWindow.java:35)
at se.wexiodisk.service.Diagnosetool.<init>(MyApp.java:142)
at se.wexiodisk.service.Diagnosetool.main(MyApp.java:178)

What am I missing? I feel it's obvious but I can't think of it now.

I think I've realized it now.
What I need to do is to add the desired jar to the classloaders search
path. Unfortunatly this method has protected access on the
URLClassLoader so I am a bit at loss how to solve this problem.



The look and feel appear in the list over installed look and feels,
but as you can see I can not use it. I get this error for every
component in my app..

regards
Daniel
.



Relevant Pages

  • Re: Corrupt Error Report-Computer keeps randomly restarting....
    ... error reports, and when I send them, a new webpage opens saying something ... It didn't load any software that I'm aware of. ... Microsoft Memory Diagnostics, http://oca.microsoft.com/en/windiag.asp ... Restart will be checked ?, make sure that under "write debugging ...
    (microsoft.public.windowsxp.general)
  • Re: Help with saving SBCL image that will connect to SLIME
    ... > I want to load all the modules, start araneida running in it, and also ... > start a repl and swank server. ... > restart it, I run into problems. ... What I generally do is load all the libraries I want, ...
    (comp.lang.lisp)
  • Re: Cant BOOT HELP PLZ
    ... When you boot the first time from the CD and you get the message "Boot from ... It will load some files then you will be prompted to press F8 to accept the ... Then your Partition with XP will show up on the screen, ... It will load all the files then restart, ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Vista - Black screen on load
    ... today I went to load up my computer which had been off for 2 ... After this kept occuring I tried to restart into safe mode, ... I do have the installation disk, ... Vista is being difficult to me. ...
    (microsoft.public.windows.vista.general)
  • Re: color & resolution
    ... However the first thing to try is a full virus check using up to date ... (system file checker). ... Once you've done this you are in a position to sort the restart issue if the ... have major problem or only setting problems. ...
    (microsoft.public.pocketpc)