0

Here's what I need in terms of functionality:

  1. multiple columns
  2. the ability to write paragraphs in a cell
  3. insert a new row under the one currently in
  4. preferably options to format

I don't think a JTable could this and I've heard a lot of complaints about JTable generally. It's my visceral reaction that JTextArea would be a nightmare. Are there any alternatives?

Preferably this could be run on any machine and look the same.

4

2 回答 2

1

如果这就是您所追求的,为什么不直接使用Apache POI来编辑/创建电子表格?

于 2013-08-09T02:04:31.560 回答
0

就像一个完全不同的答案(因为你没有得到太多并且不喜欢我的另一个)。

JTable 应该可以正常工作。它直接支持1和3。

对于 2 和 4,这取决于您在单元格中放置的控件。如果将 JTextArea 放入每个单元格中,您应该能够添加段落和格式。

也可以使用任何更复杂的文本控件,您可以将任何内容放入表格的每个单元格中。

于 2013-08-09T22:08:24.960 回答