如何在 JTable 中添加 JCombobox 并在 JTable 内触发其操作?
实际上,我想在 JTable 中添加一个 JCombobox 并在 JTable 中触发其操作。 我正在使用 Netbeans,我需要知道应该将代码放在哪里。 感谢您的合作和时间。 此致。
Actually I want to add a JCombobox in a JTable and fire its action within the JTable.
I am using Netbeans, and I need to know where exactly I should put the code.
Thank you for your cooperation and time.
Best regards.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需将 JComboBox 添加到 JTable 如果您可以按照本教程进行操作,该教程描述了如何使用组合框作为编辑器,有关
TableCellEditor
位于此处。You can simply add a JComboBox to a JTable if you can follow this tutorial which describes how to use a Combo Box as an Editor, another examples about
TableCellEditor
are here.