How to open a JPopupMenu on the title of a Tab in the JTabbedPane

V

Vincent Cantin

Hello,

I cannot find the way to listen the mouse event on the title of a componant
added to a JTabbedPane.
I want to open a JPopupMenu on it. Someone have the solution ?

Vincent
 
R

Richard B. Christ

Try to add a MouseListener to the JTabbedPane. I am not sure but I was
facing the same problem as I found out that this solved my problem, I
think. As only Component (which could responds to MouseEvent on its
own) could be added to the JTabbedPane, the only thing that responds
to MouseEvent in the JTabbedPane is finally the title panel. Regards,

richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top