- - PR -
Windows2000上でswtのテキストボックスが表示されない
1
投稿者 | 投稿内容 |
---|---|
|
投稿日時: 2004-12-21 10:24
swtを勉強中です。Windows2000上でサンプルを動かそうとしたのですが、
実行時にメインウインドウは、表示されるのですが、テキストボックスが表示されません。ウインドウを最小化し元に戻すとテキストボックスが表示されます。 windowsXPでは、最初から表示されます。原因が分かりません。 ご教授お願いいたします。 サンプルソース: import org.eclipse.swt.widgets.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.SWT; public class Main { Button button; public Main() { Display display = new Display(); Shell shell = new Shell(display); shell.setText("にょにょ〜"); shell.setSize(200,150); shell.setLayout(new FillLayout()); Text text = new Text(shell, SWT.MULTI|SWT.BORDER); // 背景色 text.setBackground(new Color(null, 0, 0, 0)); // 文字の色 text.setForeground(new Color(null, 255, 255, 255)); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) { display.sleep(); } } display.dispose(); } public static void main(String[] args) { Main main1 = new Main(); } } |
|
投稿日時: 2004-12-21 14:04
私の環境(Win2kSP4、swt-awt-win32-3063.dll、swt-win32-3063.dll、SWT3.01)
では、最初から黒いテキストボックス領域が表示されます。 |
1