public WidgetStackGrid(int w, int h, int size, boolean showGrid)
	{
		super();
		width = w;
		height = h;
		
		//setMaximumSize(width*size, height*size);
		//setMinimumSize(width*size, height*size);
		layout.setSpacing(showGrid ? 1 : 0);
		layout.setMargin(0);
		setLayout(layout);
		
		stack = new WidgetStack[height][];
		for (int i=0; i<height; ++i) {
			stack[i] = new WidgetStack[width];
			for (int j=0; j<width; ++j) {
				stack[i][j] = new WidgetStack(size, size, size, 6, i, j);
				stack[i][j].pressed.connect(pressed);
				stack[i][j].over.connect(over);
				layout.addWidget(stack[i][j], i, j);
			}
		}
	}