package com.nigorojr.typebest;

import javax.swing.JLabel;

public class Word extends JLabel {
	private JLabel wordLabel = new JLabel();
	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 put them into
	 * individual JLabels.
	 * @param word
	 */
	public Word(String word) {
		rawWord = word;
		
		split();
	}
	
	private void split() {
		for (int i = 0; i < rawWord.length(); i++) {
			JLabel letter = new JLabel(Character.toString(rawWord.charAt(i)));
			wordLabel.add(letter);
		}
	}
}
@@ -25,16 +25,45 @@
 ebest;%0A%0A
+import java.util.ArrayList;%0A%0A
 import j
@@ -104,68 +104,76 @@
 ord 
-extends JLabel %7B%0A%09private JLabel wordLabel = new JLabel();%0A%09
+%7B%0A    private ArrayList%3CLetter%3E word = new ArrayList%3CLetter%3E();%0A    
 priv
@@ -196,16 +196,21 @@
 rd;%0A
-%09%0A%09/**%0A%09
+%0A    /**%0A    
  * A
@@ -269,17 +269,20 @@
 JLabel.%0A
-%09
+    
  * The c
@@ -338,68 +338,175 @@
 and 
-put them into%0A%09 * individual JLabels.%0A%09 * @param word%0A%09 */%0A%09
+create a Letter%0A     * object for each letter.%0A     * %0A     * @param word%0A     *            The word that will be shown as a collection of %22Letter%22 class.%0A     */%0A    
 publ
@@ -528,18 +528,24 @@
 word) %7B%0A
-%09%09
+        
 rawWord 
@@ -556,28 +556,122 @@
 rd;%0A
-%09%09%0A%09%09split();%0A%09%7D%0A%09%0A%09
+%0A        split();%0A    %7D%0A%0A    /**%0A     * Splits up the word into letters and add them to an ArrayList.%0A     */%0A    
 priv
@@ -689,18 +689,24 @@
 lit() %7B%0A
-%09%09
+        
 for (int
@@ -746,56 +746,46 @@
 ) %7B%0A
-%09%09%09JLabel letter = new JLabel(Character.toString
+            Letter letter = new Letter
 (raw
@@ -803,41 +803,53 @@
 (i))
-)
 ;%0A
-%09%09%09wordLabel.add(letter);%0A%09%09%7D%0A%09
+            word.add(letter);%0A        %7D%0A    
 %7D%0A%7D

Use ArrayList of Letter in the Word class