Hello, Im new to Java Programming, and Im trying to create a Web Applet of a Income to Debt Ratio calculator. I think Im missing a Math code, because when i run the applet everything works except the when I click calculate it says my debt to ratio income is 0. Any advice would be greatly appreciated, thanks.
double index; outputLabel.setText("YOUR DEBT TO INCOME RATIO IS" + Math.round(index) + ".");
Those are the only two places index exists in your applet. You never gave index a value, besides 0 when you created it.
I think you should say
ratio=(mortgage+autoLoan+otherDebt)/monthlyIncome;
index = ratio; or
index=(mortgage+autoLoan+otherDebt)/monthlyIncome;