Reputation: 3379
I have an JTable component where I display some data. One of my column is a string, which is too long for my cell. How can I make cells in that column multi-line?
Upvotes: 1
Views: 2525
Reputation: 80603
There are some examples on the Internet about how to do this. Seems like its a pretty common task developers try and accomplish with JTables. Basically what you want to do is implement your own cell editor using AbstractCellEditor/JTextArea. Heres a link to one such example with source code:
http://www.jroller.com/santhosh/entry/multiline_in_table_cell_editing1
Upvotes: 2