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

JComboBox popup restores focus to wrong component.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • client-libs
    • None
    • beta3
    • x86
    • windows_nt

      A recent change to fix JMenus (4490344) has caused a problem with JComboBox. JMenus were fixed so that when they are closed they restore focus to the component which had focus prior to them being opened. This fix seems to affect all popups. As a result, clicking on a JComboBox and then selecting an item causes focus to return to the previous focused component rather thant the JComboBox. This is likely due to the fact that the first requestFocus() on the JComboBox doesn't complete until after the previous focus owner has been saved.

      This can be reproduced using SwingSet2. Just click on a JComboBox, select an item, and see where the focus goes.

            peterz Peter Zhelezniakov
            shickeysunw Shannon Hickey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: