JDesktopIcon problems

I

Ike

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>()
 
A

Arnaud B.

Hi,

Are you setting the "look and feel " yourself in your app ?

Arnaud

Ike said:
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>()
 
A

Arnaud B.

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
 
I

Ike

Is there a workaround I could to -- override a method perhaps, with a
try-catch such that the exception would not appear? Thanks, Ike
 
A

Arnaud B.

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
 
I

Ike

Arnaud B. said:
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


Thank you Arnaud -- I shall post it there! -Ike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top