如何在JTable单元格中显示多行 [英] How to display multiple lines in a JTable Cell

查看:226
本文介绍了如何在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)与JLabelsJTextFields

JList

这篇关于如何在JTable单元格中显示多行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆