Java: “Add Tab Button” for a JTabbedPane

后端 未结 1 1931
猫巷女王i
猫巷女王i 2021-02-15 19:17

Is it possible to add a button to a tabbed pane like in firefox.

\"enter

The plus-

1条回答
  •  暖寄归人
    2021-02-15 20:01

    I think you should be able to manage it by building your own JTabbedPaneUI and setting it on the JTabbedPane using setUI.

    Your ComponentUI has methods to get a hold of the accessible children. If you specify a JButton and a JLabel then you may be in business.

    I haven't attempted this myself though. This is "at your own risk" :)

    0 讨论(0)
提交回复
热议问题