JDK-6388189 : JTable Header focus moves out with shifting of columns
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-02-21
  • Updated: 2010-04-02
  • Resolved: 2006-03-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b76Fixed
Related Reports
Relates :  
Relates :  
Description
.
.
JTable Header focus moves out with shifting of columns  
1)Open SwingSet2, tab to the Tabledemo, select any table data aand then press F8 to get focus on to the JTable header of the first column.
2)Shift the 1st column using the mouse, and then again, using the keyboard shortcut (Alt+right arrow key).
Actual behavior:-
When I use the keyboard:
1st Column(with Header text as "First Name") shifts to 2nd column, focus is now on the second column(with Header text as "First Name").
when I use the mouse:
1st Column(with Header text as "First Name") shifts to 2nd column, but focus remains on the now new first column(with Header text as "Last Name").

Expected behavior 
1)Behavior should be same and consistent while using either the keyboard shortcut or mouse.
2)The correct behavior can be interpreted to be what is seen when using the mouse or when usting the keyboard. That is of course debatable. To my knowledge, focus of the colunn header should move along with the column which is shifted as is the case when we use the mouse.

Comments
EVALUATION the fix for this bug caused a regression: 6503981 [Bug in BasicTableHeaderUI]
10-07-2007

EVALUATION I fully agree. This one is worth fixing. When moving with the mouse, the focused header should follow (like with keyboard).
21-02-2006