• Post Reply Bookmark Topic Watch Topic
  • New Topic

StringBuffer()  RSS feed

 
Jimmy Lopez
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use the Stringbuffer().

I am trying to display in a table if the String is to long show, then display an elipses
... at the end of the string in the table ??

How can I accomplish this ?

[ June 05, 2006: Message edited by: Jimmy Lopez ]
 
Paul Clapham
Sheriff
Posts: 22521
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of "table" would this be? A database table? An HTML <table>? A Swing JTable?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You look at the length of the text, if it is too long you truncate it to the maximum allowable length and you append "..." to it.
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jesper Young:
You look at the length of the text, if it is too long you truncate it to the maximum allowable length and you append "..." to it.


What if that is just how you want the table cell to *render* it, and you don't want to lose any of the underlying text through truncation?
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jeff Albertson:


What if that is just how you want the table cell to *render* it, and you don't want to lose any of the underlying text through truncation?


Then you do exactly what they said in the renderer.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!