title: Can't get running total to work
body: <pre><code>if(e.getSource() == register)
    {
  
       String registerIndex = coursesAvailable.getSelectedValue().toString();
       for(int i = 0; i &lt; cTitle.length; i++)
       {
          double runningTotal = 0;
  
          if(cTitle[i].equals(registerIndex))
          {
             runningTotal += cPrice[i];
  
             cSeatsAvail[i] = cSeatsAvail[i] - 1;
             seatsAvailable.setText(String.valueOf(cSeatsAvail[i]));
  
             courseSelected.replaceSelection(cTitle[i] + " === $" + cPrice[i] + "\n");
             total.setText("Total: $" + runningTotal);
             break;
          }
          else
          {
             continue;
          }
       }
    }
  </code></pre>
  
  <p>Code for a "register" button. When you click it, whatever college course you have selected in a JList, it shows the course title and price in the courseSelected text area and your running total in the total text field. Problem is, my runningTotal doesn't add the values together and it seems to just replace the value in the total text field with the price of the new course.</p>