aspose file tools
The moose likes Swing / AWT / SWT and the fly likes JTable with a multiple rows in a singel cell Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "JTable with a multiple rows in a singel cell" Watch "JTable with a multiple rows in a singel cell" New topic
Author

JTable with a multiple rows in a singel cell

Suman Mummaneni
Ranch Hand

Joined: Dec 14, 2004
Posts: 87
Hi guys,

Is it possible to create a JTable with multiple rows in a single cell or is it possible to do a kind of text wraping in a the cell of a JTable. I need some sample code that does that.

-Suman
Rachel Swailes
Ranch Hand

Joined: May 18, 2004
Posts: 434
You need to have a look at the tutorial from Sun on their website about JTables. In there you will find information about DefaultCellRenderer. What you are going to have to do it change the renderer to return a JTextArea component for that cell.

Have a look at the tutorial and then post some code and we'll help you out.

Cheers,
Rachel
Suman Mummaneni
Ranch Hand

Joined: Dec 14, 2004
Posts: 87
Hi Rachel Swailes ,

I have read the tutorial from sun. He is my program but its not doing what its suppose to do.


I do not understand why my code is not work proprely its displaying the table but the row height is not changing and the text area is also not being inserted into the cell. If you have got a better Idea than this plz reply

-Suman
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JTable with a multiple rows in a singel cell
 
Similar Threads
Rendering a textArea in to JTable cell
Jtable .. cell editor
JTable
JTable
JTable