DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2006

    how do you align currency output to files?

    my problem is this whenever i put a number in front of other numbers like so
    1. 22.33 65.78 45.57
    2. 55.78 24.78 65.19
    when i get to ten and then again 100 so on
    10. 55.78 58.78 45.25

    it pushes the decimal alignment off how can i fix this? I've tried using padding but that doesn't work I'm sure it is something simple but I can't seem to find anything on how to align things in a numbered way like that. Tab works in the java world but not in a text file becuase as you know they usually don't recognize tabs. Any help would be greatly appreciated.

  2. #2
    Join Date
    Mar 2006
    ok how about how do you right justify currency in java?

  3. #3
    Join Date
    Dec 2004
    San Bernardino County, California
    What can you find in the resources available to you about Java's resurrection of printf?

  4. #4
    Join Date
    Mar 2006
    never mind i see what the problem was I was looking at formatted currency as double when it is really a string thanks though.

Similar Threads

  1. Replies: 1
    Last Post: 04-24-2008, 06:03 AM
  2. Replies: 0
    Last Post: 11-28-2005, 12:56 PM
  3. XSL: output to several files
    By Jesper Tejlgaard in forum XML
    Replies: 1
    Last Post: 05-07-2002, 01:39 PM
  4. Currency Conversion
    By Simon Jones in forum Java
    Replies: 0
    Last Post: 10-17-2001, 05:44 AM
  5. Replies: 3
    Last Post: 06-12-2001, 11:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.