且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Java:“添加标签按钮”对于JTabbedPane

更新时间:2023-12-01 17:55:22

我认为您应该能够通过构建自己的 JTabbedPaneUI来管理它code>并使用 setUI JTabbedPane 上设置它。

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

您的 ComponentUI 具有获取可访问孩子的方法。如果您指定 JButton JLabel ,那么您可能正在营业。

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" :)