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

Adding a tab component to another parent should clean up tabbed pane

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 6
    • 6
    • client-libs
    • b39
    • generic
    • generic

      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

            alexp Alexander Potochkin (Inactive)
            shickeysunw Shannon Hickey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: