Add a panel with a name. @param comp Component that will be shown when this tab is selected @param name Title to appear on the tab itself
(Component comp, String name)
| 119 | * @param name Title to appear on the tab itself |
| 120 | */ |
| 121 | public void addPanel(Component comp, String name) { |
| 122 | if (tabList.isEmpty()) { |
| 123 | currentPanel = comp; |
| 124 | } |
| 125 | tabList.add(new Tab(comp, name)); |
| 126 | cardPanel.add(name, comp); |
| 127 | } |
| 128 | |
| 129 | |
| 130 | public void setPanel(Component comp) { |