0

I cannot make values stable if the name of item is long and the other is short name the output is misaligned

Table Generated Values Values coming from table

Code String that sets the values:

String line = String.format("%-35s %2s %6s\n\n", Names, Quanti, Prices);

Output File Is Scrambled

trashgod
  • 203,806
  • 29
  • 246
  • 1,045
Usama Dar
  • 15
  • 5
  • Use a custom [renderer](https://docs.oracle.com/javase/tutorial/uiswing/components/table.html#renderer). Also, _quantum_ singular; _quanta_ plural. – trashgod Jul 26 '16 at 15:11
  • Try this [`CurrencyFormatter`](http://stackoverflow.com/a/38192710/230513); if you still have problems, please edit your question to include a [mcve] that shows your revised approach. – trashgod Jul 26 '16 at 15:17

0 Answers0