JDK-6252222 : Adding a tab component to another parent should clean up tabbed pane
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-04-07
  • Updated: 2017-05-16
  • Resolved: 2005-06-01
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 b39Fixed
Related Reports
Duplicate :  
Duplicate :  
Description
Consider this test case:

JTabbedPane tp = new JTabbedPane();
tp.add("Title", new JPanel());

JButton button = new JButton();
tp.setTabComponentAt(0, button);

JPanel p = new JPanel();
p.add(button);

The last line, which adds the button to a new parent, causes it to be removed from it's previous parent. The problem is that JTabbedPane needs to be able to deal with this and cleanup properly.
###@###.### 2005-04-07 19:51:10 GMT
###@###.### 2005-04-14 14:53:27 GMT

Comments
EVALUATION Removing tabComponent from tabContainer must update properly JTabbedPane.Page instance ###@###.### 2005-04-10 12:48:00 GMT
10-04-2005