Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

JDesktopIcon problems

Thread view: 
Ike - 27 Jan 2006 04:07 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.