// java -Djava.library.path=D:\Java_Dev\eclipse\plugins\org.eclipse.swt.win32_3.0.0\os\win32\x86.library.path=D:\Java_Dev\eclipse\plugins\org.eclipse.swt.win32_3.0.0\os\win32\x86 ClassName
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class ChildShellExample2 {
Display d = new Display();
ChildShellExample2() {
Shell s = new Shell(d);
s.setSize(500, 500);
s.open();
ChildShell cs1 = new ChildShell(s);
ChildShell cs2 = new ChildShell(s);
ChildShell cs3 = new ChildShell(s);
while (!s.isDisposed()) {
if (!d.readAndDispatch())
d.sleep();
}
d.dispose();
}
public static void main(String[] argv){
new ChildShellExample2();
}
}
class ChildShell {
ChildShell(Shell parent) {
Shell child = new Shell(parent);
child.setSize(200, 200);
child.open();
}
}
|