一个JTable,其中每行中的列数可能不同 [英] A JTable where number of columns in each row may be different

查看:86
本文介绍了一个JTable,其中每行中的列数可能不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种JTable的解决方案,该解决方案可以更改每行中的列数,但是该行的大小(以像素为单位)是恒定的.

I am looking for a solution for a JTable where I can vary the number of columns in each row, but where the size (in pixels) of the row is constant.

我发现stackoverflow到目前为止仅引用了旧解决方案的死链接:

I found stackoverflow referencing so far only dead-links to an old solution:

每行列数不同的JTable

现在有一种更新更好的方法吗? 如果是这样,该怎么办? 如果没有,有谁知道旧的解决方案是什么?

Is there a newer better way to do it now ? If so, what? If not, does anyone know what the old solution was?

谢谢.

推荐答案

有人知道旧的解决方案是什么吗?

Does anyone know what the old solution was?

这些示例似乎是在上个千年的Swing beta版本中创建的,可以找到 MultiSpanCellTable .它们可能是有用的研究对象,但它们不是最新的. YMMV.

The examples, which appear to have been created for a Swing beta release in the last millennium, may be found here. You may be looking for MultiSpanCellTable. They may be a useful object of study, but they are not current. YMMV.

这篇关于一个JTable,其中每行中的列数可能不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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