Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

boxes in data

 
Nate Johnson
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I am getting boxes in my JTable when I grab it from the Data class. I thought maybe this was from the depreciated ascii methods but even when I got rid of the depreciated methods, I still have the boxes in my table.
Also, on the getBytes() and new String() methods that take an encoding... are there some constants for those encodings? I am just letting it default to the the machine default for the moment.
Thanks in advance!
Nate
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try the .trim() method of the String class. use it in your readRecord method in the method that you fixed from being deprecated.
Mark
 
Nate Johnson
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mark Spritzler:
try the .trim() method of the String class. use it in your readRecord method in the method that you fixed from being deprecated.
Mark

Thanks Mark! That worked perfectly!
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!