Pergunta

I have created a simple frame in netbeans and used SyntheticaAluOxide look and feel.

then i added the JXDatePicker from palette to frame;

now when i try to run the code. The program is throwing Exception as :

UIDefaults.getUI() failed: no ComponentUI class for: org.jdesktop.swingx.JXMonthView[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minimumSize=,preferredSize=]
java.lang.Error
    at javax.swing.UIDefaults.getUIError(UIDefaults.java:731)
    at javax.swing.MultiUIDefaults.getUIError(MultiUIDefaults.java:130)
    at javax.swing.UIDefaults.getUI(UIDefaults.java:761)
    at javax.swing.UIManager.getUI(UIManager.java:1013)
    at org.jdesktop.swingx.plaf.LookAndFeelAddons.getUI(LookAndFeelAddons.java:383)
    at org.jdesktop.swingx.JXMonthView.updateUI(JXMonthView.java:789)
    at org.jdesktop.swingx.JXMonthView.<init>(JXMonthView.java:320)
    at org.jdesktop.swingx.JXMonthView.<init>(JXMonthView.java:257)
    at org.jdesktop.swingx.JXDatePicker.initMonthView(JXDatePicker.java:361)
    at org.jdesktop.swingx.JXDatePicker.init(JXDatePicker.java:353)
    at org.jdesktop.swingx.JXDatePicker.<init>(JXDatePicker.java:281)
    at org.jdesktop.swingx.JXDatePicker.<init>(JXDatePicker.java:232)
    at com.test.DatePickerDemo.initComponents(DatePickerDemo.java:33)
    at com.test.DatePickerDemo.<init>(DatePickerDemo.java:21)
    at com.test.DatePickerDemo$1.run(DatePickerDemo.java:89)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:688)
    at java.awt.EventQueue$3.run(EventQueue.java:686)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

I have used the swingx library provided by Synthetica. Added Addon jar also.

Please help me out.

Foi útil?

Solução 2

Solution for my problem I got from jyloo.com is :

Reply from jyloo.com :

Generally SwingX support is provided by SyntheticaAddons - so you additionally need SyntheticaAddons. We also recommend to use our DateComboBox component instead of JXDatePicker.

so I added the syntheticaAddons.jar and syntheticaAluOxideAddon.jar to my classpath and used the de.javasoft.swing.DateComboBox.

I worked like charm.

Thanks to all the Supporters from stackoverflow.com and jyloo.com support team.

Outras dicas

I have had this exception as well, but it some years back already. I remember it because it seems that Synthentica is enforcing the use of its SwingX extention when you only have a license for Synthetica core, and I was "not amused" by that. Turns out that this is not the case (because I'm using Synthetica core + SwingX now), but my memory fails me in how I got rid of that exception. Searchinf through the source code does not help either, so maybe an emailto Jyloo is in order.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top