JTabbedPane Tabs

Ok, so I have a JTabbedPane in the application and it has several panels. Is it possible to assign JPopupMenu to the tabs themselves instead of JPanel? If possible, how would I do it?

+3
source share
1 answer

See http://www.java-forums.org/awt-swing/20810-how-can-i-add-popup-menu-tab-tabbedpane.html for an example.

I think you will first name setTabComponentAt([each index], [a label with a popup attached]) it, you will need to add a method to change each tab when clicked.

+3
source

Source: https://habr.com/ru/post/1756848/


All Articles