- Code: Select all
@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