JYTabbedPane comes along with build in close button support. As you can see in this demo you can easily provide your own close Action for customization.

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