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

JComboBox triggers ActionEvent which clicking inside the empty drop-down

XMLWordPrintable

    • b50
    • generic
    • generic
    • Verified

      I am adding an empty JComboBox to a JFrame. When I click on it, an empty popup is shown. When I click inside the empty popup, I am getting an action event. This is incorrect. An empty JComboBox shoud not trigger any action event. This happens only when I use the mouse. No action event is triggered when using keyboard and pressing the down arrow.

      This is reproducible atleast since 1.4.

      I have attached a sample test. Execute the sample test. Click on the combo box. You would see an empty drop-down. Click inside the empty drop-down. You would get an action event in the console.

      I thought this is same as the bug 4760078 but this bug deals with spurious actionevents triggered during focus lost. So I am filing this one separately.
      ###@###.### 2005-03-26 14:24:31 GMT

      ###@###.### 2005-07-04 18:56:45 GMT

            draskinsunw Daniel Raskin (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: