07/04/27 05:53:31
>>97 参考までに・・・
public class A {
A(){
Display display = new Display ();
Shell shell = new Shell (display);
Button btn = new Button(shell, SWT.PUSH);
btn.setText("B-shellの起動");
btn.pack();
btn.setLocation(20,20);
Button btn2 = new Button(shell, SWT.PUSH);
btn2.setText("A-shellの子を作成");
btn2.pack();
btn2.setLocation(150,20);
btn.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent e) {
B.createBShell(e.display);} });
btn2.addSelectionListener(new SelectionAdapter(){
public void widgetSelected(SelectionEvent e) {
B.createChildShell(e.display.getActiveShell());
}});
shell.setSize (300,100);
shell.open ();
}
(以下省略)