Programming/JAVA
Eclipse-SWT Setting
Edward. K
2008. 6. 19. 16:00
반응형
새로운 Eclipse 버젼인..Ganymede가 나왔길래..
걍... 설치하고 나서..걍....SWT를 세팅해 봤다.-_-;
[ How to Eclipse-SWT Setting ]
0. Eclipse Ganymede 설치함..
: http://www.eclipse.org/ganymede/
http://www.eclipse.org/downloads/packages/
> Eclipse Classic 3.4RC4 (152 MB)
1. SWT Download
: http://archive.eclipse.org/eclipse/downloads/drops/R-3.3-200706251500/index.php#swt
|_ SWT binary and Source
: http://archive.eclipse.org/eclipse/downloads/drops/R-3.3-200706251500/index.php#SWT
[swt-3.3-win32-win32-x86.zip]
2. Setting SWT
: File > Import > General > Exiistiong Projects into Workspace
- select root directory : 프로젝트workspace
- select archive file : 다운받은 파일
3. Create Project
1. New > Java Project > HelloWorldSWT
2. properties 설정
: 생성된 프로젝트 > properties > Java Build Path > Projects > Add : org.eclipse.swt
3. Class 생성
: 생성된 프로젝트 > New > Class > public static voie main(STring[] args) 선택. 생성.
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class HelloWorldSWT {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Display display = new Display();
Shell shell = new Shell(display);
shell.setText("Hello world!");
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
}
4. Run appliction
: 생성한 class package 에서 오른쪽 마루스 선택 > Run As > Java Application 실행, swt창 생성 확인.
걍... 설치하고 나서..걍....SWT를 세팅해 봤다.-_-;
[ How to Eclipse-SWT Setting ]
0. Eclipse Ganymede 설치함..
: http://www.eclipse.org/ganymede/
http://www.eclipse.org/downloads/packages/
> Eclipse Classic 3.4RC4 (152 MB)
1. SWT Download
: http://archive.eclipse.org/eclipse/downloads/drops/R-3.3-200706251500/index.php#swt
|_ SWT binary and Source
: http://archive.eclipse.org/eclipse/downloads/drops/R-3.3-200706251500/index.php#SWT
[swt-3.3-win32-win32-x86.zip]
2. Setting SWT
: File > Import > General > Exiistiong Projects into Workspace
- select root directory : 프로젝트workspace
- select archive file : 다운받은 파일
3. Create Project
1. New > Java Project > HelloWorldSWT
2. properties 설정
: 생성된 프로젝트 > properties > Java Build Path > Projects > Add : org.eclipse.swt
3. Class 생성
: 생성된 프로젝트 > New > Class > public static voie main(STring[] args) 선택. 생성.
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class HelloWorldSWT {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Display display = new Display();
Shell shell = new Shell(display);
shell.setText("Hello world!");
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
}
4. Run appliction
: 생성한 class package 에서 오른쪽 마루스 선택 > Run As > Java Application 실행, swt창 생성 확인.
반응형