comparison org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet122.d @ 29:4e5843b771cc

First snippets buildable on windows
author Frank Benoit <benoit@tionex.de>
date Sun, 22 Mar 2009 19:55:00 +0100
parents 69b1fa94a4a8
children 536e43f63c81
comparison
equal deleted inserted replaced
28:69b1fa94a4a8 29:4e5843b771cc
40 public static void main(String[] args) { 40 public static void main(String[] args) {
41 Display display = new Display(); 41 Display display = new Display();
42 Clipboard cb = new Clipboard(display); 42 Clipboard cb = new Clipboard(display);
43 Shell shell = new Shell(display); 43 Shell shell = new Shell(display);
44 shell.setLayout(new FillLayout()); 44 shell.setLayout(new FillLayout());
45 Text text = new Text(shell, SWT.BORDER | DWT.MULTI | DWT.WRAP); 45 Text text = new Text(shell, SWT.BORDER | SWT.MULTI | SWT.WRAP);
46 Menu menu = new Menu(shell, SWT.POP_UP); 46 Menu menu = new Menu(shell, SWT.POP_UP);
47 MenuItem copyItem = new MenuItem(menu, SWT.PUSH); 47 MenuItem copyItem = new MenuItem(menu, SWT.PUSH);
48 copyItem.setText("Copy"); 48 copyItem.setText("Copy");
49 copyItem.addSelectionListener(new class() SelectionAdapter{ 49 copyItem.addSelectionListener(new class() SelectionAdapter{
50 public void widgetSelected(SelectionEvent e) { 50 public void widgetSelected(SelectionEvent e) {