public static void main (String [] args) {
	Display display = new Display ();
	final Image checkedImage = getStateImage (display, true);
	final Image uncheckedImage = getStateImage (display, false);

	Shell shell = new Shell (display);
	shell.setLayout (new FillLayout ());
	
	final Table table = new Table (shell, SWT.FULL_SELECTION | SWT.BORDER);
	for (int i = 0; i < ITEM_NAMES.length; i++) {
		TableItem item = new TableItem (table, SWT.NONE);
		item.setText (ITEM_NAMES[i]);
		item.setImage (i % 2 == 0 ? checkedImage : uncheckedImage);
	}
	table.addSelectionListener(new SelectionAdapter(){
		@Override
		public void widgetDefaultSelected(SelectionEvent e) {
			TableItem item = (TableItem)e.item;
			item.setImage(item.getImage() == checkedImage ? uncheckedImage : checkedImage);
		}
	});

	table.getAccessible ().addAccessibleControlListener (new AccessibleControlAdapter () {
		@Override
		public void getRole(AccessibleControlEvent e) {
			e.detail = ACC.ROLE_CHECKBUTTON;
		}
		@Override
		public void getState (AccessibleControlEvent e) {
			if (e.childID >= 0 && e.childID < table.getItemCount ()) {
				TableItem item = table.getItem (e.childID);
				if (item.getImage() == checkedImage) {
					e.detail |= ACC.STATE_CHECKED;
				}
			}
		}
	});

	shell.pack();
	shell.open ();
	while (!shell.isDisposed ()) {
		if (!display.readAndDispatch ()) display.sleep ();
	}
	checkedImage.dispose ();
	uncheckedImage.dispose ();
	display.dispose ();
}