Getting Controls on a shell : Shell « SWT « Java Tutorial




ShellControlsGetting.png



[출처] 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();
  }
}


경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com






본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
164 weka and java eclipse example : A Simple Machine Learning Example in Java file 졸리운_곰 2020.01.31 69
163 Create New Posts in Wordpress using Java and XMLRpc 졸리운_곰 2016.11.14 69
162 추상(abstract) 클래스가 필요한 기본적인 이유 졸리운_곰 2019.10.30 68
161 MongoBatis Ver 1.04 in SpringFrameWork (mongoDB + MyBatis) file 졸리운_곰 2020.09.21 67
160 [자바] 리스트를 순회하는 방법 졸리운_곰 2018.12.31 67
159 Eclipse RAP Tutorial for Beginners - Workbench Application (OLD) file 졸리운_곰 2021.01.30 66
158 [java, mybatis] MyBatis에서 샾(#{})과 달러(${})의 차이는 무엇일까? 졸리운_곰 2020.12.11 66
157 Neo4J Cypher 가이드 file 졸리운_곰 2019.12.25 66
156 [SpringBoot] Filter(필터) OncePerRequestFilter간단히 사용하기 file 졸리운_곰 2021.06.18 65
155 Java Map 반복(Iteration)시키는 3가지 방법 졸리운_곰 2019.01.01 65
154 [Spring] Annotation 정리 졸리운_곰 2018.12.29 65
153 Deserializing a Map<String, Object> field with Gson 졸리운_곰 2015.10.23 65
152 The safe way to stop a thread 졸리운_곰 2015.08.19 65
151 ESE2006-EclipseModelingSymposium15_GMF.pdf file 졸리운_곰 2019.09.21 64
150 JPA 부가 기능 졸리운_곰 2018.05.22 64
149 Spring - IoC & DI file 졸리운_곰 2017.10.02 64
148 Show a tool tip inside a rectangle : ToolTip « SWT « Java Tutorial file 졸리운_곰 2015.08.22 64
147 [SWT] eventListener에서 부모 class (이벤트발생 클래스) 얻기 졸리운_곰 2015.08.16 64
146 Demonstrates standard I/O redirection 졸리운_곰 2015.07.05 64
145 SpringBoot JPA 예제(결합 인덱스) 졸리운_곰 2018.12.31 63
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED