divide strings in a cell of a JTable

P

pat270881

Hello,

I have a JTable with two columns and some rows. In the second column
there are always strings displayed which does not fit the column size.
Is it possible that the string will be automatically divided when the
end of the column is reached, the cell height is increased and the
remaining chars of the string will be displayed a line below but still
in the same cell. I hope somebody has understand my explanation.

Has anybody an advice for me to realize that?

thx

pat
 
R

R.F. Pels

pat270881 said:
I have a JTable with two columns and some rows. In the second column
there are always strings displayed which does not fit the column size.
Is it possible that the string will be automatically divided when the
end of the column is reached, the cell height is increased and the
remaining chars of the string will be displayed a line below but still
in the same cell. I hope somebody has understand my explanation.

You will need a CellRenderer class for that.
 
P

pat270881

Are there any examples available how I can realize the cell renderer
class?

pat
 
S

steve

Are there any examples available how I can realize the cell renderer
class?

pat
yes there are....
to do just that.

Iv'e been doing research on JTable & jtreeTable
as it was not my main interest i did not take down the URL's ,but a Yahoo
search on JTreetable JTable will bring them up.


steve
 
R

Rogan Dawes

pat270881 said:
Are there any examples available how I can realize the cell renderer
class?

pat

Look for the Tame swing examples

Nobuo Tame..... something

Should find them on physci.org

Rogan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top