Dependencys:
</dependency>
<dependency>
<groupId>org.eclipse.swt</groupId>
<artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>
<version>3.7.2</version>
</dependency>
<dependency>
<groupId>org.eclipse</groupId>
<artifactId>jface</artifactId>
<version>3.3.0‐I20070606‐0010</version>
</dependency>
Define repository:
<repositories>
<repository>
<id>nexusrepo</id>
<url>https://swt‐repo.googlecode.com/svn/repo/</url>
</repository>
</repositories>
SWT demo app:
package com.example.swt.widgets; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class FirstSWTApplication { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); // Layout manager handle the layout // of the widgets in the container shell.setLayout(new FillLayout()); //TODO add some widgets to the Shell shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }
No comments:
Post a Comment