\r
public class ComponentsInTable extends CustomComponent {\r
\r
- static final Random rnd = new Random(1);\r
-\r
public ComponentsInTable(int cols, int rows) {\r
final OrderedLayout main = new OrderedLayout();\r
setCompositionRoot(main);\r
}\r
\r
public static Table getTestTable(int cols, int rows) {\r
+ Random rnd = new Random(1);\r
+\r
final Table t = new Table();\r
t.setColumnCollapsingAllowed(true);\r
for (int i = 0; i < cols; i++) {\r
for (int i = 0; i < rows; i++) {\r
final Vector content = new Vector();\r
for (int j = 0; j < cols; j++) {\r
- content.add(rndString());\r
+ content.add(rndString(rnd));\r
}\r
content.add(new Button("b" + i, new Button.ClickListener() {\r
\r
"Jesse", "Devin", "Seth", "Antonio", "Richard", "Miguel", "Colin",\r
"Cody", "Alejandro", "Caden", "Blake", "Carson" };\r
\r
- public static String rndString() {\r
+ public static String rndString(Random rnd) {\r
return testString[(int) (rnd.nextDouble() * testString.length)];\r
}\r
\r