Forums Register Login

Line wrap JTable cell?

+Pie Number of slices to send: Send
I'm displying a few rows from a database to a Frame, but need the columns to maintain their "formatting" directly below the previous column.
JTable works, except I would like it to line wrap on the one field that could be two or three lines long. This display is read-only, non-editable.
Any other better solutions?
+Pie Number of slices to send: Send
Look here: JTable Examples
or, have you considered using a custom renderer setting the value using HTML (with line breaks) in this particualr column?
+Pie Number of slices to send: Send
Yes, thank you. I went with a custom TableCellRenderer that extended JTextArea. Works great.
Get me the mayor's office! I need to tell him about this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1554 times.
Similar Threads
wraping in JTable cell
icons are not displaying in JTable last column
MultiLine JTable
JTable
Multi line cells in Jtable
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 05:17:36.