如何在 JTable 中添加 JCombobox 并在 JTable 内触发其操作?

发布于 2024-12-08 17:25:31 字数 101 浏览 4 评论 0原文

实际上,我想在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

有木有妳兜一样 2024-12-15 17:25:31

您只需将 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文