List of usage examples for org.eclipse.swt.widgets Button toDisplay
public Point toDisplay(int x, int y)
From source file:DisplayPositionRelative.java
public static void main(String[] args) { final Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout()); Button button = new Button(shell, SWT.PUSH | SWT.LEFT); button.setText("Button"); System.out.println("toDisplay: " + button.toDisplay(100, 200)); shell.open();// w w w . j av a 2s .co m while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } }