Knute Snortum wrote:I think you need "j" instead of "i".
Thats it, but its only part of solution.
I modified it so now it looks like this:
for (int i = 1; i <= 10; i++) {
tabsForm.add("Tab "+i, new Label("Tab "+i));
}
I had to get rid of initializer. Now it works flawlesly. Thanks.