List of usage examples for org.eclipse.swt.custom StyledText cut
public void cut()
From source file:StyledTextClipboard.java
public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); StyledText text1 = new StyledText(shell, SWT.V_SCROLL | SWT.WRAP | SWT.BORDER); StyledText text2 = new StyledText(shell, SWT.V_SCROLL | SWT.WRAP | SWT.BORDER); text1.setText("1234567"); text1.setSelectionRange(2, 4);//from www. j a va2s .c o m text1.cut(); text2.paste(); text1.setBounds(10, 10, 100, 100); text2.setBounds(10, 300, 100, 100); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); }