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

ChoiceBox#setItems causes bizarre first selection behavior

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 7u6
    • Fix Version/s: 8
    • Component/s: javafx
    • Environment:

      Windows 7 64 bit or OS X 10.7.4 64 bit

      Description

      If the user has never selected an item from a ChoiceBox, and the program calls setItems to change the list of its items, then the first time the user clicks on the control, an odd down arrow and slender box appear instead of the list of items. Rolling the mouse over the arrow reveals the item list. The behavior is extremely similar to http://javafx-jira.kenai.com/browse/RT-21891, which is marked as fixed in 2.2, but I'm observing this bug in 2.2.0-b21. I don't remember seeing it in 2.1, but I no longer have a 2.1 environment to test with.

      I've attached a test case where the ChoiceBox starts with no items. Clicking the "Populate" button calls setItems, after which clicking on the ChoiceBox shows the odd behavior. Similar behavior occurs if you initialize the ChoiceBox with some items but the user never selects one before the call to setItems.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              psomashe Parvathi Somashekar (Inactive)
              Reporter:
              bmellejfx Bill van Melle (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved:
                Imported: