subItem.setAccelerator(SWT.CTRL + 'S');
subItem.setAccelerator(SWT.MOD1 + 'S');
private void createFileMenu(Menu menuBar) {	//File menu.	MenuItem item = new MenuItem(menuBar, SWT.CASCADE);	item.setText(resAddressBook.getString("File_menu_title"));	Menu menu = new Menu(shell, SWT.DROP_DOWN);	item.setMenu(menu);	/** 	 * Adds 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();			items[1].setEnabled(table.getSelectionCount() != 0); // edit contact			items[5].setEnabled((file != null) && isModified); // save			items[6].setEnabled(table.getItemCount() != 0); // save as		}	});	//File -> New Contact	MenuItem subItem = new MenuItem(menu, SWT.NULL);	subItem.setText(resAddressBook.getString("New_contact"));	subItem.setAccelerator(SWT.CTRL + 'N');	subItem.addSelectionListener(new SelectionAdapter() {		public void widgetSelected(SelectionEvent e) {			newEntry();		}	});	subItem = new MenuItem(menu, SWT.NULL);	subItem.setText(resAddressBook.getString("Edit_contact"));	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]);		}	});		new MenuItem(menu, SWT.SEPARATOR);		//File -> New Address Book	subItem = new MenuItem(menu, SWT.NULL);	subItem.setText(resAddressBook.getString("New_address_book"));	subItem.setAccelerator(SWT.CTRL + 'B');	subItem.addSelectionListener(new SelectionAdapter() {		public void widgetSelected(SelectionEvent e) {			closeAddressBook();			newAddressBook();		}	});	//File -> Open	subItem = new MenuItem(menu, SWT.NULL);	subItem.setText(resAddressBook.getString("Open_address_book"));	subItem.setAccelerator(SWT.CTRL + 'O');	subItem.addSelectionListener(new SelectionAdapter() {		public void widgetSelected(SelectionEvent e) {			closeAddressBook();			openAddressBook();		}	});	//File -> Save.	subItem = new MenuItem(menu, SWT.NULL);	subItem.setText(resAddressBook.getString("Save_address_book"));	subItem.setAccelerator(SWT.CTRL + 'S');	subItem.addSelectionListener(new SelectionAdapter() {		public void widgetSelected(SelectionEvent e) {			save();		}	});		//File -> Save As.	subItem = new MenuItem(menu, SWT.NULL);	subItem.setText(resAddressBook.getString("Save_book_as"));	subItem.addSelectionListener(new SelectionAdapter() {		public void widgetSelected(SelectionEvent e) {			saveAs();		}	});			new MenuItem(menu, SWT.SEPARATOR);		//File -> Exit.	subItem = new MenuItem(menu, SWT.NULL);	subItem.setText(resAddressBook.getString("Exit"));	subItem.addSelectionListener(new SelectionAdapter() {		public void widgetSelected(SelectionEvent e) {			shell.close();		}	});}