JTable根据Data调整列宽和行宽
我需要在 Jtable 单元格中显示以下数据。到目前为止,即使我用换行符覆盖对象的 toString 方法,所有内容都在一行中。如何设置 Jtable 来调整单元格高度和宽度,具体取决于数据上。
Segment ID: 1
Elevation : 2.0
Azimuth :30.0
I need to show the below data in a Jtable cell.As of now everything comes in a single line even-though i'm overriding the object's toString method with newline characters.How can I set the Jtable to adjust the cell height and width depending on the data.
Segment ID: 1
Elevation : 2.0
Azimuth :30.0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试在 JTable 单元格中嵌入 JTextArea 对象
Try to embed a JTextArea object within a JTable cell