Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trailing squares problem

 
James Du
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I encountered a very low-level problem.
I found the string fetched from db.db maybe have some trailing blanks. the unicode of these characters is '\u0000' and they display trailing squares in the JTable. I had assumed that those characters could be removed by String.trim() but they turned out not to be whitespaces .
How you guys solved the situation? using a loop? it works but a little awkward i think
Any small tricks? :roll:
Regards.
James
 
Siddharth Mehrotra
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use trim method on the data that u get
this will solve the problem
 
James Du
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the trim() method could not do the work, it just remove the whitespaces
James
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic