private void loanAmountSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_loanAmountSliderStateChanged
        loanAmountSlider.setPaintTicks(true);
        loanAmountSlider.setSnapToTicks(true);
        loanAmountSlider.setMinorTickSpacing(100);
        loanAmountDisplay.setText(String.valueOf(loanAmountSlider.getValue()));
        int amount = loanAmountSlider.getValue();
        if (amount <= 10000) {
            interestRateLabel.setText("6.5");
            int totalAmount = (int) (amount / 100 * Double.parseDouble(interestRateLabel.getText()) + amount);
            int repayMonths = Integer.parseInt(repaymentTimeChoice.getSelectedItem().toString());
            monthlyRepayments.setText(String.valueOf(totalAmount / repayMonths));
            totalAmountLabel.setText(String.valueOf(totalAmount));

        } else if (amount > 10000 && amount <= 20000) {
            interestRateLabel.setText("5.7");
            int totalAmount = (int) (amount / 100 * Double.parseDouble(interestRateLabel.getText()) + amount);
            int repayMonths = Integer.parseInt(repaymentTimeChoice.getSelectedItem().toString());
            monthlyRepayments.setText(String.valueOf(totalAmount / repayMonths));
            totalAmountLabel.setText(String.valueOf(totalAmount));

        } else if (amount > 20000 && amount <= 30000) {
            interestRateLabel.setText("4.9");
            int totalAmount = (int) (amount / 100 * Double.parseDouble(interestRateLabel.getText()) + amount);
            int repayMonths = Integer.parseInt(repaymentTimeChoice.getSelectedItem().toString());
            monthlyRepayments.setText(String.valueOf(totalAmount / repayMonths));
            totalAmountLabel.setText(String.valueOf(totalAmount));

        } else if (amount > 30000) {
            interestRateLabel.setText("4.7");
            int totalAmount = (int) (amount / 100 * Double.parseDouble(interestRateLabel.getText()) + amount);
            int interestRate = Integer.parseInt(repaymentTimeChoice.getSelectedItem().toString());
            monthlyRepayments.setText(String.valueOf(totalAmount / interestRate));
            totalAmountLabel.setText(String.valueOf(totalAmount));

        }
    }//GEN-LAST:event_loanAmountSliderStateChanged