TableColumn column1 = new TableColumn(table, SWT.LEFT); TableColumn column2 = new TableColumn(table, SWT.LEFT);
new TableColumn(table, SWT.LEFT); new TableColumn(table, SWT.LEFT);
public void test_setForegroundILorg_eclipse_swt_graphics_Color() {	Display display = tableItem.getDisplay();	Color red = display.getSystemColor(SWT.COLOR_RED);	Color blue = display.getSystemColor(SWT.COLOR_BLUE);		// no columns	assertEquals(table.getForeground(), tableItem.getForeground(0));	assertEquals(tableItem.getForeground(), tableItem.getForeground(0));	tableItem.setForeground(0, red);	assertEquals(red, tableItem.getForeground(0));		// index beyond range - no error	tableItem.setForeground(10, red);	assertEquals(tableItem.getForeground(), tableItem.getForeground(10));		// with columns	TableColumn column1 = new TableColumn(table, SWT.LEFT);	TableColumn column2 = new TableColumn(table, SWT.LEFT);		// index beyond range - no error	tableItem.setForeground(10, red);	assertEquals(tableItem.getForeground(), tableItem.getForeground(10));		tableItem.setForeground(0, red);	assertEquals(red, tableItem.getForeground(0));	tableItem.setForeground(0, null);	assertEquals(table.getForeground(),tableItem.getForeground(0));	tableItem.setForeground(0, blue);	tableItem.setForeground(red);	assertEquals(blue, tableItem.getForeground(0));		tableItem.setForeground(0, null);	assertEquals(red, tableItem.getForeground(0));		tableItem.setForeground(null);	assertEquals(table.getForeground(),tableItem.getForeground(0));		try { 		Color color = new Color(display, 255, 0, 0);		color.dispose();		tableItem.setForeground(color);		fail("No exception thrown for color disposed");			} catch (IllegalArgumentException e) {	}}