Я использую Substance look and feel version 6.0 в моем приложении Java Swing.Приложение прекрасно работает для меня, но некоторые пользователи приложения, особенно те, которые используют Windows 7, получают исключение по существу:
java.lang.InternalError: Unable to instantiate org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.colorchooser.ColorPalettesChooser
at org.pushingpixels.substance.internal.ui.SubstanceColorChooserUI.createDefaultChoosers(SubstanceColorChooserUI.java)
at org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.Quaqua13ColorChooserUI.__org__pushingpixels__substance__internal__contrib__randelshofer__quaqua__Quaqua13ColorChooserUI__installUI(Quaqua13ColorChooserUI.java)
at org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.Quaqua13ColorChooserUI.installUI(Quaqua13ColorChooserUI.java)
at org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.Quaqua14ColorChooserUI.__org__pushingpixels__substance__internal__contrib__randelshofer__quaqua__Quaqua14ColorChooserUI__installUI(Quaqua14ColorChooserUI.java)
at org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.Quaqua14ColorChooserUI.installUI(Quaqua14ColorChooserUI.java)
at org.pushingpixels.substance.internal.ui.SubstanceColorChooserUI.__org__pushingpixels__substance__internal__ui__SubstanceColorChooserUI__installUI(SubstanceColorChooserUI.java)
at org.pushingpixels.substance.internal.ui.SubstanceColorChooserUI.installUI(SubstanceColorChooserUI.java)
at javax.swing.JComponent.setUI(Unknown Source)
at javax.swing.JColorChooser.setUI(Unknown Source)
at javax.swing.JColorChooser.updateUI(Unknown Source)
at javax.swing.JColorChooser.(Unknown Source)
at javax.swing.JColorChooser.(Unknown Source)
at javax.swing.JColorChooser.(Unknown Source)
at org.jdesktop.swingx.JXColorSelectionButton.getChooser(JXColorSelectionButton.java)
at org.jdesktop.swingx.JXColorSelectionButton$1.propertyChange(JXColorSelectionButton.java)
at java.beans.PropertyChangeSupport.fire(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.awt.Component.firePropertyChange(Unknown Source)
at java.awt.Component.setBackground(Unknown Source)
at javax.swing.JComponent.setBackground(Unknown Source)
Это исключение встречается в последней строке в этом коде:
JXColorSelectionButton myColorSelectionButton = new JXColorSelectionButton();
myColorSelectionButton.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
myColorSelectionButton.setFocusPainted(false);
contentPane.add(myColorSelectionButton, cc.xy(29, 19));
/**
* Some code here
*/
myColorSelectionButton.setBackground( Color.WHITE ); // Excepton occurres here !!
Я не могу найти место, где можно задать этот вопрос о веществе, поэтому, если вы поможете мне, это будет оценено.