I know this is an old topic, but I found it when looking for a solution to a similar (albeit slightly different) problem.
To determine which tab was selected, use the ChangeEvent . This is a very easy way to perform an action each time you select a tab. Hope this helps someone else, although this is an old topic.
private void zakladkiStateChanged(javax.swing.event.ChangeEvent evt) { if (zakladki.getTitleAt(zakladki.getSelectedIndex()).equals("tab title here")) {
Bulit
source share