Summing elements in an Array List after adding a new element in net beans
<p>Summing elements of an array list right after adding a new element in net beans causes the first element added to not be counted in the sum.Then when i add another element it only sums the second element added.Code is below and there is an image of my problem.</p>

<p><a href="https://gyazo.com/12f13ab5724af3de8d9848994987910d" rel="nofollow">https://gyazo.com/12f13ab5724af3de8d9848994987910d</a></p>

<pre><code>private void balanceAddActionPerformed(java.awt.event.ActionEvent evt) {
    try {
        outputBox.setText("");
        String check = addInput.getText();
        int check1 = check.length();
        if ("".equals(check)) {
            errorLabel.setText("Nothing has been entered to be added.");
            for (int i = 0; i &lt; balance.size(); i++) {
                outputBox.setText(outputBox.getText() + balance.get(i) + "\n");
            }
        } else if (check1 &gt;= 7) {
            errorLabel.setText("Too many characters limit your characters to 7");
            addInput.setText("");
            for (int i = 0; i &lt; balance.size(); i++) {
                outputBox.setText(outputBox.getText() + balance.get(i) + "\n");
            }
        } else {
            double list = Integer.parseInt(addInput.getText());
            balance.add(list);
            addInput.setText("");
            //Setting the array list in outputbox
            for (double i = 0; i &lt; balance.size(); i++) {
                outputBox.setText(outputBox.getText() + balance.get((int) i) + "\n");
                errorLabel.setText("");
                double sum = 0;
                for (double j = 1; j &lt; balance.size(); j++) {
                    sum += balance.get((int) j);

                    String converted = String.valueOf(sum);
                    errorLabel.setText("Your sum is " + (converted));
                }
            }
        }
    } catch (Exception e) {
        errorLabel.setText("Error wrong characters.");
        for (int i = 0; i &lt; balance.size(); i++) {
            outputBox.setText(outputBox.getText() + balance.get(i) + "\n");
        }
    }
}
</code></pre>