I have a class which extend JInternalFrame. Whenever this class is invoked,
it always spits out the following exception, listed below. For the life of
me, I cannot track this down.
Is anyone aware of what I may be missing here to cause this? Thanks, Ike
UIDefaults.getUI() failed: no ComponentUI class for:
javax.swing.JInternalFrame$JDesktopIcon[,0,0,0x0,invalid,hidden,alignmentX=0
.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=]
java.lang.Error
at javax.swing.UIDefaults.getUIError(Unknown Source)
at javax.swing.MultiUIDefaults.getUIError(Unknown Source)
at javax.swing.UIDefaults.getUI(Unknown Source)
at javax.swing.UIManager.getUI(Unknown Source)
at javax.swing.JInternalFrame$JDesktopIcon.updateUI(Unknown Source)
at javax.swing.JInternalFrame$JDesktopIcon.<init>(Unknown Source)
at javax.swing.JInternalFrame.<init>(Unknown Source)
at RalphVince.Controls.JScrollableDesktopPane.BaseInternalFrame.<init>()
at GG.chat.JFslcChatClientInternalFrame.<init>()
Arnaud B. - 27 Jan 2006 10:23 GMT
Hi,
Are you setting the "look and feel " yourself in your app ?
Arnaud
> I have a class which extend JInternalFrame. Whenever this class is invoked,
> it always spits out the following exception, listed below. For the life of
[quoted text clipped - 3 lines]
>
> UIDefaults.getUI() failed: no ComponentUI class for:
javax.swing.JInternalFrame$JDesktopIcon[,0,0,0x0,invalid,hidden,alignmentX=0
.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=]
> java.lang.Error
> at javax.swing.UIDefaults.getUIError(Unknown Source)
[quoted text clipped - 6 lines]
> at RalphVince.Controls.JScrollableDesktopPane.BaseInternalFrame.<init>()
> at GG.chat.JFslcChatClientInternalFrame.<init>()
Ike - 27 Jan 2006 13:28 GMT
> Hi,
>
> Are you setting the "look and feel " yourself in your app ?
>
> Arnaud
Yes, exactly.
Arnaud B. - 27 Jan 2006 14:23 GMT
So just a guess,
Maybe the L&F you're using does not provide any valid UI for
JInternalFrame$JDesktopIcon
Try to launch your app with the default L&F to check this.
Arnaud
> > Hi,
> >
[quoted text clipped - 3 lines]
>
> Yes, exactly.
Ike - 27 Jan 2006 14:53 GMT
Is there a workaround I could to -- override a method perhaps, with a
try-catch such that the exception would not appear? Thanks, Ike
> So just a guess,
>
[quoted text clipped - 12 lines]
> >
> > Yes, exactly.
Arnaud B. - 27 Jan 2006 15:09 GMT
I'm afraid that try-catching this Exception won't be enough.
You may have to do some things like :
UIManager.put(XXX, YYY);
Where XXX is the String used to identify the JInternalFrame$JDesktopIcon's
UI
and YYY the ui class for it.
e.g :
UIManager.put("DesktopIconUI", "javax.swing.plaf.basic.
BasicDesktopIconUI");
I'm no L&F expert though, so you may want to repost this problem to
comp.lang.java.gui .
Regards,
Arnaud
> Is there a workaround I could to -- override a method perhaps, with a
> try-catch such that the exception would not appear? Thanks, Ike
[quoted text clipped - 15 lines]
> > >
> > > Yes, exactly.
Ike - 27 Jan 2006 17:44 GMT
> I'm afraid that try-catching this Exception won't be enough.
>
[quoted text clipped - 17 lines]
>
> Arnaud
Thank you Arnaud -- I shall post it there! -Ike