1
在我主我遍歷每個League
如下:動態添加標籤來JTabbedPane的
for (League l : t.getLeagues()) {
LeaguePanel leaguePanel = new LeaguePanel(l);
roundTabs.addTab(l.getName(), leaguePanel);
}
這應該然後創建一個JPanel
並將其添加到標籤。
public class LeaguePanel extends JPanel {
private League league;
private JComboBox roundComboBox;
LeaguePanel(League l) {
league = l;
JPanel leagePanel = new JPanel();
leagePanel.add(new JLabel("Tournament Information"));
}
然而,標籤被創建,但沒有出現在它
任何想法,爲什麼?
Jeez。我希望在這裏有另一雙眼睛!〜 謝謝。解決了! – Jackmagic1