Allignment problem

  • (2 Pages)
  • +
  • 1
  • 2

20 Replies - 527 Views - Last Post: 09 March 2013 - 07:15 PM Rate Topic: -----

#16 glr  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 20
  • Joined: 20-February 13

Re: Allignment problem

Posted 09 March 2013 - 06:09 AM

How do I use tabs?
Was This Post Helpful? 0
  • +
  • -

#17 glr  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 20
  • Joined: 20-February 13

Re: Allignment problem

Posted 09 March 2013 - 06:17 AM

Google how to use it and it worked. Thanks!
Was This Post Helpful? 0
  • +
  • -

#18 Flukeshot  Icon User is offline

  • A little too OCD
  • member icon

Reputation: 417
  • View blog
  • Posts: 1,030
  • Joined: 14-November 12

Re: Allignment problem

Posted 09 March 2013 - 06:24 AM

The simplest answers are oft the best answers. Glad I could help.
Was This Post Helpful? 1
  • +
  • -

#19 Takk  Icon User is offline

  • D.I.C Head

Reputation: 40
  • View blog
  • Posts: 111
  • Joined: 08-March 13

Re: Allignment problem

Posted 09 March 2013 - 01:22 PM

glr,

Just to add a bit to it all, you sacrificed the help of someone who provided you with a very precise answer above then bashed him on his ego.. no no.. I'm not going to quote it, but andrew is right when he suggests you read it again. Honestly, if this post hasn't taught you exactly 3 different yet feasible solutions to your specific issue, I would suggest the same, that you begin again from day 1. Your road ahead will only be paved with potholes unless you develop a love for problem solving and become accustomed to pounding your head on things while trying to resolve issues in your code.
Was This Post Helpful? 1
  • +
  • -

#20 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8347
  • View blog
  • Posts: 31,913
  • Joined: 06-March 08

Re: Allignment problem

Posted 09 March 2013 - 06:13 PM

Forget tabs... you had a good start

System.out.printf("%10.2f", m, totalkilometer, km, totalmiles);

you have 4 things to print and m is an int so something like

System.out.printf("%3d %10.2f %10.2f %10.2f\", m, totalkilometer, km, totalmiles);
Was This Post Helpful? 1
  • +
  • -

#21 glr  Icon User is offline

  • New D.I.C Head

Reputation: -2
  • View blog
  • Posts: 20
  • Joined: 20-February 13

Re: Allignment problem

Posted 09 March 2013 - 07:15 PM

View Postpbl, on 09 March 2013 - 06:13 PM, said:

Forget tabs... you had a good start

System.out.printf("%10.2f", m, totalkilometer, km, totalmiles);

you have 4 things to print and m is an int so something like

System.out.printf("%3d %10.2f %10.2f %10.2f\", m, totalkilometer, km, totalmiles);


Thanks! I didn't ask to to be spoon fed. I did tried but couldn't get it to work. Now I know. Thanks again! Unlike some people here they just have too big of an ego to correct beginners.

This post has been edited by glr: 09 March 2013 - 07:24 PM

Was This Post Helpful? -1
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2