subItem.setAccelerator(SWT.CTRL + 'V');
subItem.setAccelerator(SWT.MOD1 + 'V');
private MenuItem createEditMenu(Menu menuBar) {	//Edit menu.	MenuItem item = new MenuItem(menuBar, SWT.CASCADE);	item.setText(resAddressBook.getString("Edit_menu_title"));	Menu menu = new Menu(shell, SWT.DROP_DOWN);	item.setMenu(menu);		/** 	 * Add a listener to handle enabling and disabling 	 * some items in the Edit submenu.	 */	menu.addMenuListener(new MenuAdapter() {		public void menuShown(MenuEvent e) {			Menu menu = (Menu)e.widget;			MenuItem[] items = menu.getItems();			int count = table.getSelectionCount();			items[0].setEnabled(count != 0); // edit			items[1].setEnabled(count != 0); // copy			items[2].setEnabled(copyBuffer != null); // paste			items[3].setEnabled(count != 0); // delete			items[5].setEnabled(table.getItemCount() != 0); // sort		}	});		//Edit -> Edit	MenuItem subItem = new MenuItem(menu, SWT.CASCADE);	subItem.setText(resAddressBook.getString("Edit"));	subItem.setAccelerator(SWT.CTRL + 'E');	subItem.addSelectionListener(new SelectionAdapter() {		public void widgetSelected(SelectionEvent e) {			TableItem[] items = table.getSelection();			if (items.length == 0) return;			editEntry(items[0]);		}	});	//Edit -> Copy	subItem = new MenuItem(menu, SWT.NULL);	subItem.setText(resAddressBook.getString("Copy"));	subItem.setAccelerator(SWT.CTRL + 'C');	subItem.addSelectionListener(new SelectionAdapter() {		public void widgetSelected(SelectionEvent e) {			TableItem[] items = table.getSelection();			if (items.length == 0) return;			copyBuffer = new String[table.getColumnCount()];			for (int i = 0; i < copyBuffer.length; i++) {				copyBuffer[i] = items[0].getText(i);			}		}	});		//Edit -> Paste	subItem = new MenuItem(menu, SWT.NULL);	subItem.setText(resAddressBook.getString("Paste"));	subItem.setAccelerator(SWT.CTRL + 'V');	subItem.addSelectionListener(new SelectionAdapter() {		public void widgetSelected(SelectionEvent e) {			if (copyBuffer == null) return;			TableItem item = new TableItem(table, SWT.NONE);			item.setText(copyBuffer);			isModified = true;		}	});		//Edit -> Delete	subItem = new MenuItem(menu, SWT.NULL);	subItem.setText(resAddressBook.getString("Delete"));	subItem.addSelectionListener(new SelectionAdapter() {		public void widgetSelected(SelectionEvent e) {			TableItem[] items = table.getSelection();			if (items.length == 0) return;			items[0].dispose();			isModified = true;		}	});		new MenuItem(menu, SWT.SEPARATOR);		//Edit -> Sort(Cascade)	subItem = new MenuItem(menu, SWT.CASCADE);	subItem.setText(resAddressBook.getString("Sort"));	Menu submenu = createSortMenu();	subItem.setMenu(submenu);		return item;	}