public void setTabCloseCallback( BiConsumer<JTabbedPane, Integer> tabCloseCallback ) {
		putClientProperty( TABBED_PANE_TAB_CLOSE_CALLBACK, tabCloseCallback );
	}
Specifies the callback that is invoked when a tab close button is clicked.
The callback is responsible for closing the tab.
<p>
Use a {@link java.util.function.BiConsumer}&lt;javax.swing.JTabbedPane, Integer&gt;
that receives the tabbed pane and the tab index as parameters:
<pre>{@code
myTabbedPane.setTabCloseCallback( (tabbedPane, tabIndex) -> {
    // close tab here
} );
}</pre>
If you need to check whether a modifier key (e.g. Alt or Shift) was pressed
while the user clicked the tab close button, use {@link java.awt.EventQueue#getCurrentEvent}
to get current event, check whether it is a {@link java.awt.event.MouseEvent}
and invoke its methods. E.g.
<pre>{@code
AWTEvent e = EventQueue.getCurrentEvent();
boolean shift = (e instanceof MouseEvent) ? ((MouseEvent)e).isShiftDown() : false;
}</pre>
flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/components/FlatTabbedPane.java