JDK-4740419 : Selecting unselected tab doesn't get the focus, under some condition.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.1
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2002-09-02
  • Updated: 2004-09-30
  • Resolved: 2004-09-30
Related Reports
Duplicate :  
Relates :  
Description
Steps to reproduce:
1) Create container with two components. One wich can get focus (e.g. JTextField) and JTabbedPane. 
2) Add some components to JTabbedPane so it has at least two tabs.
3) Now set focus to the first component, which isn't the JTabbedPane (e.g. the JTextField).
4) Let say the JTabbedPane has selected the first tab.
5) Now if you select by mouse the unselected (i.e. the second tab), the tab gets
selected, but the focus remains in the JTextField!!

On the other hand if you under the same condition click on the selected tab, the focus is transferred. The transferring of the focus by clicking on unselected tab, seems to be working only if the focus is already in the JTabbedPane.

(I can reproduce this on linux and solaris, expecting it is also at windows).

Comments
EVALUATION Yes, this is a bug. We try to emulate windows focusing for tabs, but it isn't quite correct. We should update this so that upon selection of the tab we focus one of the child components. ###@###.### 2002-09-03 Name: omR10226 Date: 11/13/2003 The bug isn't reproducible in 1.5.0b25. ====================================================================== Closing as a duplicate of 5092589 which has a thorough description of what the behavior should be. ###@###.### 2004-09-30
30-09-2004