Navigation

Own programs

Snippets

Libraries

Deutsch

WrappingRenderer


The WrappingRenderer is a TableCellRenderer. It lets the cells have line wrapping and adjusts their height if neccessary. To ensure that a resice of a cell of one column does not negatively affect a cell of another column in the same row, it needs all the columns with this renderer as a constructor argument.
I only tested it with tables which contained only text. I doubt that it would work correctly with a table which contains, say, images.

Download together with a test class: wrappingrenderer.zip

Java Web Start of the test program: WrappingRenderer WebStart