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

6246460: JComboBox.showPopup() displays the popup even when the component is disabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 1.4.0
    • client-libs

      I am calling JComboBox.setEnabled(false) and JComboBox is disabled. On clicking one of the buttons in the frame, I am calling JComboBox.showPopup(). I expect JComboBox not to show the popup since it is disabled. But JcomboBoc shows the popup and the user is able to select the items from the drop-down. Selection of any item triggers ActionEvent. I feel this is incorrect. JComboBox.setPopupVisible() must check whether the component is enabled or not before showing the Popup.

      This is reproducible atleast since 1.4 on all platforms. Reproducible on Mustang-b28 also.

      I have attached a sample test. Execute the sample test. You would see a JFrame with a JcomboBox and a button. Make sure JComboBox is disabled. Click on the button. You would see a popup. Try selecting an item from the popup. You would see an ActionEvent being triggered in the console.
      ###@###.### 2005-03-26 13:31:48 GMT

            shickeysunw Shannon Hickey (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: