package com.nigorojr.typebest;

import java.util.ArrayList;

import javax.swing.JPanel;

public class Line extends JPanel {
    private ArrayList<Word> line = new ArrayList<Word>();
}

@@ -50,24 +50,51 @@
 ArrayList;%0A%0A
+import javax.swing.JLabel;%0A
 import javax
@@ -202,10 +202,623 @@
 ord%3E();%0A
+    private final JLabel space = new JLabel(%22 %22);%0A%0A    /**%0A     * Returns the total width of the words in the line by adding the length of%0A     * the word and the width of the spaces between them.%0A     * %0A     * @return The total width of the words in the line, including the spaces%0A     *         between the words.%0A     */%0A    public int getWordsWidth() %7B%0A        int width = 0;%0A        for (int i = 0; i %3C line.size(); i++)%0A            width += line.get(i).getWidth();%0A%0A        // Add total length of the spaces between words%0A        width += space.getWidth() * (line.size() - 1);%0A%0A        return width;%0A    %7D%0A
 %7D%0A

Implement getWordsWidth method