UIDefaults.getUI() failed: no ComponentUI class for: com.jid

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

UIDefaults.getUI() failed: no ComponentUI class for: com.jid

Postby jtheuer » Fri May 23, 2008 2:54 am

HI, I'm playing around with UI changes. I wrote a JList that changes the UI:
@Override
public void valueChanged(ListSelectionEvent e) {
UIInstance ui = (UIInstance) box.getSelectedValue();
if (!e.getValueIsAdjusting() && ui != null) {
UIManager.setLookAndFeel(ui.lnf);
LookAndFeelFactory.installJideExtension();

for (Component component : updateRoot) {
SwingUtilities.updateComponentTreeUI(component);
}
}
}

Note, that UIInstance is just a simple class containing the classname and the UI description.

My problem is, that I get that error after the UI has changed:
UIDefaults.getUI() failed: no ComponentUI class for: com.jidesoft.swing.JideButton[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.5,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,defaultIcon=file:/home/jtheuer/daten/repositories/jjcomponents/svn/target/crystal_project/32x32/filesystems/blockdevice.png,disabledIcon=,disabledSelectedIcon=,margin=null,paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=Themes,defaultCapable=true]
java.lang.Error
at javax.swing.UIDefaults.getUIError(UIDefaults.java:706)
at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:117)
at javax.swing.UIDefaults.getUI(UIDefaults.java:736)
at javax.swing.UIManager.getUI(UIManager.java:1012)
at com.jidesoft.swing.JideButton.updateUI(JideButton.java:102)
at javax.swing.AbstractButton.init(AbstractButton.java:2149)
at com.jidesoft.swing.JideButton.<init>(JideButton.java:86)
at com.jidesoft.dialog.MultiplePageDialog.createIconButton(MultiplePageDialog.java:1081)
at com.jidesoft.dialog.MultiplePageDialog.createIconPanel(MultiplePageDialog.java:949)
at com.jidesoft.dialog.MultiplePageDialog.createIndexPanel(MultiplePageDialog.java:556)
at com.jidesoft.dialog.MultiplePageDialog.createContentPanel(MultiplePageDialog.java:296)
at com.jidesoft.dialog.StandardDialog$DefaultStandardDialogPane.createContentPanel(StandardDialog.java:332)
at com.jidesoft.dialog.StandardDialogPane.initComponents(StandardDialogPane.java:106)
at com.jidesoft.dialog.StandardDialog.initComponents(StandardDialog.java:201)
at de.jtheuer.diki.gui.ConfigurationWindow.initComponents(ConfigurationWindow.java:97)
at com.jidesoft.dialog.StandardDialog.initialize(StandardDialog.java:186)
at com.jidesoft.dialog.StandardDialog.pack(StandardDialog.java:156)
at de.jtheuer.diki.gui.ConfigurationWindow.<init>(ConfigurationWindow.java:90)
at de.jtheuer.diki.gui.actions.ConfigureAction.actionPerformed(ConfigureAction.java:69)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1170)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1211)
at java.awt.Component.processMouseEvent(Component.java:6038)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
at java.awt.Component.processEvent(Component.java:5803)
at java.awt.Container.processEvent(Container.java:2058)
at java.awt.Component.dispatchEventImpl(Component.java:4410)
at java.awt.Container.dispatchEventImpl(Container.java:2116)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
at java.awt.Container.dispatchEventImpl(Container.java:2102)
at java.awt.Window.dispatchEventImpl(Window.java:2429)
at java.awt.Component.dispatchEvent(Component.java:4240)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)


Some Jide components are not painted afterwards (Although the ui-change has been applied to most other components)

Any ideas?

Jan[/quote]
jtheuer
 
Posts: 9
Joined: Wed Apr 02, 2008 3:13 am

Postby JIDE Support » Thu May 29, 2008 1:09 pm

Your code looks correctly. What L&F you are trying to set to when the exception happens? There was a bug with JGoodies etc Metal-based L&F in an older release but it should be fixed now in the latest release.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 47 guests