问题
I have it working, however the popup menu appears when you right click anywhere inside the tab. I only would like it to appear when you right click the top of the tab (the name). I cannot figure out how to do this. Any help is appreciated.
Thanks.
回答1:
Try adding your popup to the custom component demonstrated in TabComponentsDemo.
来源:https://stackoverflow.com/questions/9220889/java-right-clicking-jtabbledpane-tab