Raw materials:
Eclipse
SWT point I download
Steps:
1. Download SWT in. zip format
2. Import Swt**.zip to eclipse,file-->import-->import and select the Existing Projects into workspace-- >select Archivie file-->finish
OK, it's almost done.
3. Testing
Create a new Java project
Set properties, Java Build path--Prject-->add-->swt-->ok
Create a new Java program
1 ImportOrg.eclipse.swt.widgets.Display;2 ImportOrg.eclipse.swt.widgets.Shell;3 4 /**5 * Hello world!6 *7 */8 Public classApp9 {Ten Public Static voidMain (string[] args) One { ADisplay display =NewDisplay (); -Shell Shell =NewShell (display); -Shell.settext ("Hello world!"); the Shell.open (); - while(!shell.isdisposed ()) { - if(!Display.readanddispatch ()) - display.sleep (); + } - display.dispose (); + } A}
Run
OK,SWT environment is completed. This may not be easy to use, next, using a plugin, drag the control directly into the panel
Reference official documents: https://www.eclipse.org/swt/eclipse.php
P.S still read the official website document.
Eclipse SWT Development Environment Building