alisn you should start up your own thread rather than reviving old threads.
System.out.printf("%1$10d%2$11.2f%3$10d%4$11.2f\n", i, QQ, d, inventory);
Chris
ok well i tried and it didnt work...i dunno if i've explained it right or not..
basically output has gotta look like this.
Week Quantity Demand Inventory
Order
1 87 45 42
2 87 45 84
3 0 45 39
4 87 45 81
5 0 45 36
6 9 45 0
Now: Because Quantity Order and Inventory are doubles in declaration for calculation purposes, i need them to be shown with no decimal places.
also since i'm using GUI...this is my complete line that has to get modified...
output = output + String.format("<specifies>", i, OQ, d, inventory);
i just dunno what specifiers and whether String.format is right or not...i know GUI doesnt use System.out.printf...
thanx again chris for the effort...my whole code is around 260 lines and this is the only line that's really giving me the shits...
if you can help me you'll be my hero..
thanx heaps..