I have a JTable with 14 number/string columns. Every other row or thereabouts I want to simply display a sentence that may take up the length of an entire row.
so basically I want the text in the first cell in a row to be able to span the length the whole row if necessary. (like in excel)
Is this possible?
Joined: Nov 29, 2004
After wasting a whole day researching, I have found that my only hope may lie in creating a custom TableCellRenderer. I have done so but have not found a way to lengthen the cell width. I can do all kinds of fun stuff to the cells but not length the width.
Please remember that I want custom column widths by row.
i got the same problem. there doesn't seem to be an easy answer to this. one guy once managed, but he tweaked the standard lib quite a bit.
i am now going to do it like this: i take a table with one column. when i want to put a row in, that spans all columns, i add a label, when there should be more than one cell, i add another table in the cell of the outer table.