• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Formatting Cost

 
Lance Finney
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to format the cost in the JTable so it shows up as a dollar amount? For example, $400 instead of just 400? I've looked at the Swing tutorial, and it doesn't seem that getClass() will help because the field will be either a String or and Integer. The option I see is possibly using the WeirdRenderer pattern to force a different rendering for that column.
Furthermore, would this be a waste of time?
Thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic