@Override public void insertTab(String title, Icon icon, Component component, String tip, int index) { super.insertTab(title, icon, component, tip, index); if (!parentFrame.isTabCloseButtonEnabled()) return; MDITabTitle newComponent = new MDITabTitle(parentFrame, this, title, icon, component); setTabComponentAt(indexOfComponent(component), newComponent); }