• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jtable row contents bleed into next column

 
Prashant Langade
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a Jtable which shows contents on each row. but the row contents which are bigger than the width of the column gets shown as "BlahBlah.." (basically getting showed up as .. in the end)

User has to manually increase the width of the column to see those extra contents.

For e.g if the row contents are ABCDEFGHI and the widht of the column for that row is sufficient enough to show only ABCDEF of that, then it will show up as something like "ABCD.."

Now my requirement is to show the complete contents over to next column on the same row.

Note: I could simply add the code to show the widht of the column to adjust according to largest row content for that column . But unfortunately this is not what is required.

Any pointers/help is appreciated.

Thanks
Prashant
 
Rob Camick
Ranch Hand
Posts: 2699
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This can be done by using a tool tip:

 
Prashant Langade
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Rob for the quick help.

But i think by using this (tooltip) code, user is required to hover the mouse over the text in a column cell to see it. but what i want is to show the excess contents(more than widht of column) of the cell to bleed
into next column.

I have a tree structure in place. meaning there would a single value in first row in first column, when i click over it,the next row's second column value gets showed up...like that
so i can afford to show the excess contents over to the next column.

do you think by any chance,it is possible?


Thanks
Prashant
 
Rob Camick
Ranch Hand
Posts: 2699
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anything is possible, but you would need to rewrite the JTable UI, which is above my skill level. I have no idea where you would start to do something like this.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!