void (boolean enabled) { super.setEnabled(enabled); JTableHeader header = myComponent.getTableHeader(); if (header instanceof ComponentWithExpandableItems<?>) { ((ComponentWithExpandableItems<?>)header).setExpandableItemsEnabled(enabled); } }