Im pretty new to this programming so forgive me if i make any mistakes. Im making a little program with NetBeans, only now i have to add something which i really dont know how to do.
I've made a little program with which you can calculate your interest. You have three jTextFields:
1.Your starting amount of money.
2.The percentage of interest you're dealing with.
3.The amount of years you want to calculate.
So further i have a jButton which contains the most of my code.
double inputNumberInterest = Double.parseDouble(interest.getText()); double inputNumberMoney = Double.parseDouble(money.getText()); int inputNumberYears = Integer.parseInt(years.getText()); DecimalFormat decimaal = new DecimalFormat("#,###.##"); double result = inputNumberMoney * Math.pow(inputNumberInterest / 100 + 1, inputNumberYears); this.reply.setText("" + decimaal.format(result);
So this code prints the end result of the calculation. Now what my question is, I want to years in between to be printed also in a textArea. For example the user of this program enters 5, as years of interest. I want the 1st, 2nd, 3rd and 4th to be printed in a textArea. And the 5th year as it is now printed in a jTextField as i already have.
Does anyone know how to do this?
I hope to hear from you soon.