Can't understand this Java GridLayout program
<p>The below code is extraction from a Java program. The program code is very big so I am just posting the needed part. In the code, what does the <code>if (i == 2)</code> do? What does it check, and how can it check for 2?</p>

<pre><code>panel.setLayout(new GridLayout(5, 4, 5, 5));

String[] buttons = {
    "Cls", "Bck", "", "Close", "7", "8", "9", "/", "4", 
    "5", "6", "*", "1", "2", "3", "-", "0", ".", "=", "+"
};


for (int i = 0; i &lt; buttons.length; i++) {

    if (i == 2) 
        panel.add(new JLabel(buttons[i]));
    else 
        panel.add(new JButton(buttons[i]));
}
</code></pre>
