JDK-4153419 : Failure of JComboBox focus management
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.1.6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1998-06-30
  • Updated: 1998-06-30
  • Resolved: 1998-06-30
Related Reports
Duplicate :  
Description

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

Comments
EVALUATION This is a special case of the "compound component problem". I'm marking this as a duplicate of that bug. tom.santos@eng 1998-06-30
30-06-1998