[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 2chのread.cgiへ]
Update time : 02/24 18:23 / Filesize : 383 KB / Number-of Response : 978
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

★★ Java の宿題ここで答えます Part 60 ★★



85 名前:デフォルトの名無しさん mailto:sage [2007/01/25(木) 18:29:24 ]
>>24
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class TwoWindow {
public static void main(String[] args) {
Display display = new Display();
String[] images = {"image1.jpg", "image2.jpg"};
Shell[] shells = new Shell[images.length];
for (int i = 0; i < images.length; i++) {
shells[i] = new Shell(display);
new Label(shells[i], SWT.NULL).setImage(new Image(display, images[i]));
shells[i].setLayout(new FillLayout());
shells[i].pack();
shells[i].open();
}
while (! isAllDisposed(shells)) if (! display.readAndDispatch()) display.sleep();
display.dispose();
}
private static boolean isAllDisposed(Shell... shells) {
for (Shell shell : shells) if (! shell.isDisposed()) return false;
return true;
}
}






[ 続きを読む ] / [ 携帯版 ]

全部読む 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧](;´∀`)<383KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef