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

Failure of JComboBox focus management

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.6
    • client-libs



      Name: mf23781 Date: 06/30/98


      If a JComboBox object is set to be non-editable, with the
      setEditable(false) method, then the isFocusTraversable()
      method should return true. Whereas the actual case is that
      it returns false.

      The test case below illustrates the problem:

      import com.sun.java.swing.*;

      public class JComboBoxTest
      {
          public JComboBoxTest()
      {
      try
      {
      JComboBox c = new JComboBox(); // Create JComboBox object
      boolean[] state = { true, false};
      for(int i=0;i<state.length;i++)
      {
      c.setEditable(state[i]);
      System.out.println("setEditable = " + state[i] +
      " isFocusTraversable = " + c.isFocusTraversable());
      }

      System.exit(0);
      }
      catch(Throwable e)
      {
      }
      }

      public static void main(String argv[])
      {
      JComboBoxTest t = new JComboBoxTest();
      }
      }
      ======================================================================

            tsantossunw Tom Santos (Inactive)
            miflemi Mick Fleming
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: