• 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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!