问题描述
如何使用行标题创建JTable?
How can I create a JTable with a row header?
这个问题看似简单,我可以在Google搜索中找到很多提示。尽管如此,我发现的一切都是如何制作一个模仿真实标题的列的提示。虽然这很好,但它带来的问题是外观和感觉不能很好地应用。
This question seems simple and I could find a lot of tips with Google searches. Nevertheless, everything I have found were tips of how make a column which mimics the real header. Although this is good, it comes with the problem of that the look and feel can not be applied very well.
推荐答案
来解决我的问题我只是作为我的渲染器返回到行标题已经标题我想要的标题。让我解释一下,我创建一个带有标题的表,获取标题并将其作为我的渲染器返回。
to resolve my problem I simply return as my renderer to the row header a header already with the title I want. Let me explain, I create a table, with the header, get the header and return it as my renderer.
谢谢!
Leandro
Thanks!Leandro
这篇关于JTable行标头实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!