facebook

Exception trying to use JXDatePicker

  1. MyEclipse Archived
  2.  > 
  3. Matisse/Swing UI Development
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #263524 Reply

    David Orriss Jr
    Participant

    I’m trying to add a JXDatePicker to a form and I’m getting the following stacktrace and error:

    Annotation: The component cannot be instantiated. Please make sure it is a JavaBean.
    java.lang.ClassCastException: org.jdesktop.swingx.plaf.basic.BasicMonthViewUI
        at org.jdesktop.swingx.calendar.JXMonthView.updateUI(JXMonthView.java:305)
        at org.jdesktop.swingx.calendar.JXMonthView.<init>(JXMonthView.java:261)
        at org.jdesktop.swingx.calendar.JXMonthView.<init>(JXMonthView.java:247)
        at org.jdesktop.swingx.JXDatePicker.<init>(JXDatePicker.java:126)
        at org.jdesktop.swingx.JXDatePicker.<init>(JXDatePicker.java:110)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at org.netbeans.modules.form.CreationFactory.createDefaultInstance(CreationFactory.java:130)
        at org.netbeans.modules.form.RADComponent.createBeanInstance(RADComponent.java:193)
        at org.netbeans.modules.form.RADComponent.initInstance(RADComponent.java:137)
        at org.netbeans.modules.form.MetaComponentCreator.initComponentInstance(MetaComponentCreator.java:1258)
        at org.netbeans.modules.form.MetaComponentCreator.createVisualComponent(MetaComponentCreator.java:757)
        at org.netbeans.modules.form.MetaComponentCreator.access$1(MetaComponentCreator.java:746)
        at org.netbeans.modules.form.MetaComponentCreator$2.run(MetaComponentCreator.java:169)
        at org.netbeans.modules.form.FormLAF$1.run(FormLAF.java:58)
        at org.openide.util.Mutex.doEventAccess(Mutex.java:1172)
        at org.openide.util.Mutex.readAccess(Mutex.java:253)
        at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:43)
        at org.netbeans.modules.form.MetaComponentCreator.precreateVisualComponent(MetaComponentCreator.java:166)
        at org.netbeans.modules.form.HandleLayer$NewComponentDrag.init(HandleLayer.java:2471)
        at org.netbeans.modules.form.HandleLayer$NewComponentDrag.<init>(HandleLayer.java:2466)
        at org.netbeans.modules.form.HandleLayer.mouseMoved(HandleLayer.java:1612)
        at java.awt.Component.processMouseMotionEvent(Component.java:5533)
        at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3144)
        at java.awt.Component.processEvent(Component.java:5257)
        at java.awt.Container.processEvent(Container.java:1966)
        at java.awt.Component.dispatchEventImpl(Component.java:3955)
        at java.awt.Container.dispatchEventImpl(Container.java:2024)
        at java.awt.Component.dispatchEvent(Component.java:3803)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3905)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
        at java.awt.Container.dispatchEventImpl(Container.java:2010)
        at java.awt.Window.dispatchEventImpl(Window.java:1774)
        at java.awt.Component.dispatchEvent(Component.java:3803)
    [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    
    #263525 Reply

    David Orriss Jr
    Participant

    P.S. I’m working on a sample project to demonstrate the error. When I have it ready I’ll put it on a server for you guys.

    #263528 Reply

    David Orriss Jr
    Participant

    I found that upgrading to the latest SwingX release resolved this issue. Please close this out. Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Exception trying to use JXDatePicker

You must be logged in to post in the forum log in