@@ -0,0 +1,2617 @@
+package com.nigorojr.typebest;%0A%0Aimport javax.swing.JLabel;%0A%0Apublic class Letter extends JLabel %7B%0A    private char rawLetter;%0A%0A    /**%0A     * Constructs a new JLabel with the given letter.%0A     * %0A     * @param letter%0A     *            The one letter that will be used as the content of this%0A     *            JLabel.%0A     */%0A    public Letter(char letter) %7B%0A        super(Character.toString(letter));%0A        rawLetter = letter;%0A        // TODO: Add color variables (toBeTyped etc...) in TypePanel class and%0A        // make them protected so that they can be accessed in here.%0A    %7D%0A%0A    /**%0A     * Creates a new %22Letter%22 JLabel with the given letter. The length of the%0A     * given String must be at least 1. If a String with length more than 1 is%0A     * given, only the first letter will be stored.%0A     * %0A     * @param letter%0A     *            The one letter that will be used as the content of JLabel.%0A     *            This constructor assumes that the given String has length of%0A     *            at least 1.%0A     */%0A    public Letter(String letter) %7B%0A        this(letter.charAt(0));%0A    %7D%0A%0A    /**%0A     * Getter method for the actual letter contained in this JLabel.%0A     * %0A     * @return The actual letter contained in this JLabel.%0A     */%0A    public char getRawLetter() %7B%0A        return rawLetter;%0A    %7D%0A%0A    /**%0A     * Getter method for the actual letter contained in this JLabel.%0A     * %0A     * @return The actual letter contained in this JLabel in String.%0A     */%0A    public String getStringRawLetter() %7B%0A        return Character.toString(rawLetter);%0A    %7D%0A%0A    /**%0A     * Checks whether the given keystroke corresponds to the letter shown in the%0A     * JLabel.%0A     * %0A     * @param keyStroke%0A     *            The keystroke that the user made.%0A     * @return True if the given keystroke is a correct keystroke, in other%0A     *         words, if the given letter is the same as the rawLetter.%0A     */%0A    public boolean isCorrectKeyStroke(char keyStroke) %7B%0A        return (rawLetter == keyStroke);%0A    %7D%0A%0A    /**%0A     * Checks whether the given keystroke corresponds to the letter shown in the%0A     * JLabel.%0A     * %0A     * @param keyStroke%0A     *            The keystroke that the user made. This variable must have%0A     *            length 1. If the length is more than 1, only the first letter%0A     *            is seen.%0A     * @return True if the given keystroke is a correct keystroke, in other%0A     *         words, if the given letter is the same as the rawLetter.%0A     */%0A    public boolean isCorrectKeyStroke(String keyStroke) %7B%0A        return isCorrectKeyStroke(keyStroke.charAt(0));%0A    %7D%0A%7D%0A

Add Letter class