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

editabel combo box not updated correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • None
    • 1.4.1
    • client-libs
    • None

    Description

      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);
          }
      }

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: