Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6354778

Disabling a Scrollpane does not disable the button present inside the scrollpane

XMLWordPrintable

    • Cause Known
    • generic
    • generic

      I have added some components to a scrollpane and I am calling ScrollPane.setEnabled(false) when clicking one of the buttons. When button is the focus owner before disabling, it remains as the focus owner even after scrollpane is disabled and it responds to all keyboard actions such as space bar. Pressing space bar on this button when scrollpane is disabled triggers an Action Event.

      This is noticed only for the button and not for other components. This is reproducible on XToolkit as well as WinXP. This is noticed on Tiger as well as Mustang. This is not reproducible on Motif. On XToolkit, the button is visually grayed out but still being pressed when pressing SPACE BAR.

      I have attached a sample test. Execute the sample test. Make sure the button has the focus. Everytime you press the button, the state of scrollpane toggles between enabled/disabled. Press 'SPACE BAR'. This would actually disable scrollpane. Now try pressing SPACE BAR again. Actually the button is not supposed to respond. But it responds and enables the scrollpane.

            dav Andrei Dmitriev (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: