package com.nigorojr.typebest;

import java.util.ArrayList;

import javax.swing.JLabel;

public class Word {
    private ArrayList<Letter> word = new ArrayList<Letter>();
    private String rawWord;

    /**
     * Accepts a String which is what will be shown in this JLabel.
     * The constructor will then split the word into letters and create a Letter
     * object for each letter.
     * 
     * @param word
     *            The word that will be shown as a collection of "Letter" class.
     */
    public Word(String word) {
        rawWord = word;

        split();
    }

    /**
     * Splits up the word into letters and add them to an ArrayList.
     */
    private void split() {
        for (int i = 0; i < rawWord.length(); i++) {
            Letter letter = new Letter(rawWord.charAt(i));
            word.add(letter);
        }
    }
}
@@ -21,24 +21,47 @@
 .typebest;%0A%0A
+import java.awt.Color;%0A
 import java.
@@ -869,10 +869,603 @@
  %7D%0A    %7D
+%0A%0A    /**%0A     * Changes the color of the letters in the word.%0A     * %0A     * @param color%0A     *            The color of the letters.%0A     */%0A    public void setForeground(Color color) %7B%0A        for (int i = 0; i %3C word.size(); i++)%0A            word.get(i).setForeground(color);%0A    %7D%0A%0A    /**%0A     * Changes the background color of the word to the given color.%0A     * %0A     * @param color%0A     *            The background color of the word.%0A     */%0A    public void setBackground(Color color) %7B%0A        for (int i = 0; i %3C word.size(); i++)%0A            word.get(i).setBackground(color);%0A    %7D
 %0A%7D

Add method that changes color of the "Word"