jtable 和自定义组合
我想在 jtable (swing) 中实现一个属性表。 我想要例如
** 2 栏表
第 1 行:属性文本|文本框。第2行: 属性文本|值的组合框 A、B、C。第 3 行:属性文本|文本框。 第 4 行:属性文本|的组合框 值 E、F、G。
**
我不明白如何开始。我正在使用 Netbeans。 我需要实现一个单元格编辑器还是什么?
谢谢
I want to implement a properties table in jtable (swing).
I want to have e.g.
**
2 column table
Row1: Property-text| Txtbox. Row2:
Property-text| ComboBox of values
A,B,C. Row3: Property-text| Txtbox.
Row4: Property-text| ComboBox of
values E,F,G.
**
I can not understand how to get this started. I am using Netbeans.
I need to implement a celltableeditor or what?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一个示例展示了如何为表中的每一行指定不同的编辑器:
第二个示例展示了如何创建一个非常基本的属性编辑器(尽管它不支持组合框):
您应该能够实现您想要的使用上述一个或两个示例中的建议。
The first example shows how you can specify a different editor for each row in the table:
The second example shows how you can create a very basic property editor (although it doesn't support combo boxes):
You should be able achieve what you want by using the suggestions from one or both of the above examples.