I am a newbie to
java programming, although I can figure out most of what I want in the program, I can't seem to get the right alignment for my output.
The requirements for my project have already been met, but to make the program aesthetically pleasing I would like my ouput right aligned.
Any help or suggestions would be greatly appreciated
//loop for amortization schedule
double E_Balance = userPrincipal;
double mInterest;
double mPrincipal;
for(int j = 0; j < userTerms; j++)
{
mInterest = (E_Balance * userInterest); //Interest paid per month
mPrincipal = (Mpayment - mInterest);// principal paid per month
E_Balance = (E_Balance - mPrincipal); //ending balance for each month after payment.
//print structure for amortization schedule
txtResults.append((j+1) + "\t\t" + dec.format(mInterest)
+ "\t\t" + dec.format(E_Balance) +"\n");
This is just a piece of my code.