如何在JTable单元格中显示多行 [英] How to display multiple lines in a JTable Cell
本文介绍了如何在JTable单元格中显示多行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建如下图所示的JTable
:
I would like to create a JTable
like the below picture:
将使用哪个java
类,并且可能如何使用?
Which java
class will be used and possibly how?
推荐答案
基本上,您可以将任何类型的JComponents
放入JTable
单元格,具体取决于内容是否可编辑,这就是我所关注的内容
basically you can put any type of JComponents
to the JTable
cell, depends of if is contents editable, thats talking me about follows
-
JTable
有一个TableColumn
而没有TableHeader
JPanel
(GridBagLayout
)与JLabels
或JTextFields
JList
这篇关于如何在JTable单元格中显示多行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文