1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| public class MyTabbedPane extends JTabbedPane {
public void insertTab(String title, Icon icon, Component component, String tip, int index) {
super.insertTab(title, icon, component, tip, index);
fireTabInserted(title, icon, component, tip, index);
}
public void removeTabAt(int index) {
super.removeTabAt(index);
fireTabRemoved(index);
}
protected void fireTabInserted(String title, Icon icon, Component component, String tip, int index) {
...
}
protected void fireTabRemoved(int index) {
...
}
} |
Partager