- 전체
- JAVA 일반
- JAVA 수학
- JAVA 그래픽
- JAVA 자료구조
- JAVA 인공지능
- JAVA 인터넷
- Java Framework
- Java GUI (AWT,SWING,SWT,JFACE)
- SWT and RCP (web RAP/RWT)[eclipse], EMF
Java GUI (AWT,SWING,SWT,JFACE) Getting Controls on a shell : Shell « SWT « Java Tutorial
2015.03.30 16:33
Getting Controls on a shell : Shell « SWT « Java Tutorial
[출처] http://www.java2s.com/Tutorial/Java/0280__SWT/GettingControlsonashell.htm
import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class ShellControlsGetting { public static void main(String[] args) { Display display = new Display(); final Shell shell = new Shell(display); shell.setLayout(new FillLayout()); for (int i = 0; i < 20; i++) { Button button = new Button(shell, SWT.TOGGLE); button.setText("B" + i); } Control[] children = shell.getChildren(); for (int i = 0; i < children.length; i++) { Control child = children[i]; System.out.println(child); } shell.pack(); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }
본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.