Is it possible to get the index of the tab that is closed in JTabbedPane (in the context that's before the closing action)? In particular, when one closes a tab that is not in focus. I know we can use tabPane.getSelectedIndex()
to get the index of the tab that is in focus. But it doesn't help in this case. I would really appreciate any help!!
Asked
Active
Viewed 29 times
1

A BeauTifful Life
- 53
- 5
-
How are you closing the tab? Can you show some code, preferably a valid [mcve]? – Hovercraft Full Of Eels Oct 16 '18 at 01:11
-
1Why are you re-asking the same question as recent? – Hovercraft Full Of Eels Oct 16 '18 at 01:11