MouseEvents for a JTabbedPane Tab component are not bleeding through

后端 未结 3 1761
走了就别回头了
走了就别回头了 2021-01-21 07:13

I have a JTabbedPane with a custom tab component. That component contains a JLabel (To display the tab title) and a JButton (A close butto

3条回答
  •  伪装坚强ぢ
    2021-01-21 07:55

    I seem to remember a question like this recently although I can't find the posting. I believe the problem is that the "custom component" receives the mouse event so it is not passed on to the tabbed pane. The solution suggested was to use the dispatchEvent(...) method to redispatch the mouse event to the proper tab.

提交回复
热议问题