flamingo
  1. flamingo
  2. FLAMINGO-8

ClassCastException when pressing space on JCommandButton

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: milestone 1
    • Component/s: common components
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      8

      Description

      Anytime the spacebar is pressed on any JCommandButton, the exception below is
      thrown. Looks like the key bindings where not updated when JCommandButton no
      longer descended from AbstractButton (this did not happen until after that change).

      Set as P1 since it means that pressing the space bar in the app effectively
      crashes it.

      Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException:
      org.jvnet.flamingo.common.JCommandButton cannot be cast to
      javax.swing.AbstractButton
      at
      javax.swing.plaf.basic.BasicButtonListener$Actions.actionPerformed(BasicButtonListener.java:275)
      at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)
      at javax.swing.JComponent.processKeyBinding(JComponent.java:2849)
      at javax.swing.JComponent.processKeyBindings(JComponent.java:2884)
      at javax.swing.JComponent.processKeyEvent(JComponent.java:2812)
      at java.awt.Component.processEvent(Component.java:5818)
      at java.awt.Container.processEvent(Container.java:2058)
      at java.awt.Component.dispatchEventImpl(Component.java:4413)
      at java.awt.Container.dispatchEventImpl(Container.java:2116)
      at java.awt.Component.dispatchEvent(Component.java:4243)
      at
      java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
      at
      java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:697)
      at
      java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:962)
      at
      java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:834)
      at
      java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:661)
      at java.awt.Component.dispatchEventImpl(Component.java:4285)
      at java.awt.Container.dispatchEventImpl(Container.java:2116)
      at java.awt.Window.dispatchEventImpl(Window.java:2440)
      at java.awt.Component.dispatchEvent(Component.java:4243)
      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)

        Activity

        Hide
        kirillcool added a comment -

        This should be fixed in the latest 3.1dev drop. The new
        utest.common.CommandButtonTestCase is the first version of unit testing the UI
        interaction aspects of command button component.

        Thanks
        Kirill

        Show
        kirillcool added a comment - This should be fixed in the latest 3.1dev drop. The new utest.common.CommandButtonTestCase is the first version of unit testing the UI interaction aspects of command button component. Thanks Kirill
        Hide
        flynnk added a comment -

        Working now. Marking as closed.

        Show
        flynnk added a comment - Working now. Marking as closed.

          People

          • Assignee:
            kirillcool
            Reporter:
            flynnk
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: