我在netbeans中创建了一个简单的框架,并使用了SyntheticaAluOxide外观。

然后我将JXDatePicker从调色板添加到框架中;

现在,当我尝试运行代码时。该程序将Exception抛出为:

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)


我使用了Synthetica提供的swingx库。还添加了Addon jar。

请帮帮我。

最佳答案

我也有这个例外,但几年前已经存在。我记得它是因为当您仅拥有Synthetica核心许可时,Synthentica似乎正在强制使用其SwingX扩展,我对此并不感到“高兴”。事实并非如此(因为我现在使用的是Synthetica core + SwingX),但是我的记忆力使我无法摆脱这种异常。 Searchinf遍历源代码也无济于事,因此也许可以向Jyloo发送电子邮件。

关于java - 具有Synthetica Aluoxide外观的jxdatepicker无法正常工作,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17467188/

10-10 19:21