getTabComponentAt和getComponentAt

getTabComponentAt() returns the custom component you might add as the tab title.
getComponentAt() returns the contents of a tab.

The tab component is the component that renders the tab--not the component that displays in the pane.

// In this case the look and feel renders the title for the tab.
tabbedPane.addTab("Tab", myComponent);
// In this case the custom component is responsible for rendering the title of the tab.
tabbedPane.addTab(null, myComponent);
tabbedPane.setTabComponentAt(0, new JLabel("Tab"));

你可能感兴趣的:(Java)