• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Displaying a carriage return in a jTable row.

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a storageDataSet that is being displayed in a GUI through a jTable. The columns are being manipulated by row through a DataRow object. One particular column is a string that is concatinated from many other stings and each string ends in '\n'. How can I get this to be displayed? Right now the returns are just ignored, and all is lumped together.

Thanks!
[ January 27, 2005: Message edited by: Hosh Nasi ]
 
Hosh Nasi
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry about that. I am using jTable not the borland implemenation.. Does anyone have any ideas on this one? I heard a CellRenderer might be useful. Anyone have a good link on how to use them?

Thanks!
 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use html in Swing components.

will be displayed in two lines.
 
Hosh Nasi
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Very interesting. So if I user the br to to break the row will this display in my JTable?

thanks,

::EDIT:: I mean display within my JTable that is on my Gui.
[ January 30, 2005: Message edited by: Hosh Nasi ]
 
Hosh Nasi
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vlado Zajac:
You can use html in Swing components.

will be displayed in two lines.



I tried to test this is many ways. No luck however, now all I see is the my tags <HTML><BR></HTML> when I expect a new line.

thanks,
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic