• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Jtable row contents bleed into next column  RSS feed

 
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
 
Rancher
Posts: 3040
22
  • 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
Rancher
Posts: 3040
22
  • 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!