switches_table = new Table(composite_1, SWT.BORDER | SWT.FULL_SELECTION);
switches_table.setHeaderVisible(true);
switches_table.setLinesVisible(true);
final Menu switchMenu = new Menu(switches_table);
switches_table.setMenu(switchMenu);
switchMenu.addMenuListener(new MenuAdapter() {
public void menuShown(MenuEvent e) {
// Get rid of existing menu items
MenuItem[] items = switchMenu.getItems();
for (int i = 0; i < items.length; i++) {
((MenuItem) items[i]).dispose();