• Post Reply Bookmark Topic Watch Topic
  • New Topic

StringBuffer + JTextField  RSS feed

 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why is this not working?

Thanks,
John Price aka cc11rocks
 
Rob Spoor
Sheriff
Posts: 20903
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you expect it to do? What does it do instead? And very importantly, is the text more than 20 characters to start with? Because if it's less than 20 characters you will get NULL characters ('\0' or '\u0000') to fill the StringBuffer up to 20 characters, and those will probably not be displayed properly.
 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Crap! Sorry to bug you guys! I am doing an instant message project. I have two versions, one for users and one for mods. I kept compiling the one for mods which I didn't change. I am so stupid. Anyway, when I found out that, I compiled it and it worked fine. Here is the code I used. Sorry guys

Sorry,
John Price aka cc11rocks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!