JYTabbedPane provides some predefined close button strategies (NONE, SELECTED_TAB, ALL_TABS). However, sometimes it's necessary to use a custom strategy e.g. to make the main tab non-closeable. This example demonstrates how to install a custom ICloseButtonStrategy so there's no way for the user to close the main tab.

All relevant lines are highlighted. Press the "Run..." button to start the demo.