editabel combo box not updated correctly

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.4.1
    • Component/s: client-libs
    • None

      An editable JComboBox does not react correctly is a choice is selected after it has previously been selected and the choice edited.

      Attached is a simple demo program that puts a JComboBox in a JFrame.
      Compile and run it. Select "yellow" from the drop down list.
      Edit "yellow" to "yell". Now select "yellow from the drop down list again.
      It does not update the text field.

      Problem seem on 1.3.1, 1.4 and 1.4.1-rc.


      import javax.swing.*;
      public class demo {
          public static void main(String[] args) {
      JComboBox cb = new JComboBox();
      cb.setEditable(true);
      cb.addItem("red");
      cb.addItem("yellow");
      cb.addItem("green");
      JFrame f = new JFrame();
      f.getContentPane().add(cb);
      f.pack();
      f.setVisible(true);
          }
      }

            Assignee:
            Mark Davidson (Inactive)
            Reporter:
            Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: