Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

No ComponentUI class found error - Please Help

54 views
Skip to first unread message

Rexraven

unread,
Mar 6, 2000, 3:00:00 AM3/6/00
to
I'm implementing a custom look and feel where all panels have an image
tile for a background. I did it and it works but I keep on getting the
following error whenever I instantiate a JPanel, but not when I
instantiate one of my own subclasses of JPanel:

UIDefaults.getUI() failed: no ComponentUI class for:
javax.swing.JPanel[,0,0,0x0,invalid,layout=java.awt.FlowLayout,alignmentX=null,alignmentY=null,border=,flags=34,maximumSize=,minimumSize=,preferredSize=,defaultLayout=java.awt.FlowLayout[hgap=5,vgap=5,align=center]]
java.lang.Error
at javax.swing.UIDefaults.getUIError(UIDefaults.java:351)
at javax.swing.UIDefaults.getUI(UIDefaults.java:379)
at javax.swing.UIManager.getUI(UIManager.java:568)
at javax.swing.JPanel.updateUI(JPanel.java:110)
at javax.swing.JPanel.<init>(JPanel.java:70)
at javax.swing.JPanel.<init>(JPanel.java:100)
at javax.swing.JRootPane.createContentPane(JRootPane.java:202)

I thought I had fixed this last Friday by ensuring that my class
directory came first in the classpath but, for some reason, that
simply stopped working Monday morning.

Obviously it is finding the proper ComponentUI class since the tiled
image background is being drawn, it just insists on reporting the
error that it cannot find the class. Does anyone have any clues as to
what can be wrong here? I'm pretty sure the code is correct. I'm just
assuming this is another of the dozen flaky classpath errors that is
consuming more than half of our projects' development time. They just
keep on popping up. I'm really starting to hate Java because of them.
Thanks for any help!

--chris


0 new messages