Source Code : Child Shell Example 3

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

Child Shell Example 3

Child Shell Example 3
// java -Djava.library.path=D:Java_Deveclipsepluginsorg.eclipse.swt.win32_3.0.0oswin32x86.library.path=D:Java_Deveclipsepluginsorg.eclipse.swt.win32_3.0.0oswin32x86 ClassName


import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class ChildShellExample3 {
  Display d = new Display();

  ChildShellExample3() {
    Shell s = new Shell(d);
    s.setSize(500, 500);
    s.open();
    ChildShell cs1 = new ChildShell(s);
    System.out.println("Execution Continues");
    while (!s.isDisposed()) {
      if (!d.readAndDispatch())
        d.sleep();
    }
    d.dispose();

  }

  public static void main(String[] argv) {
    new ChildShellExample3();
  }
}

class ChildShell {

  ChildShell(Shell parent) {
    Shell child = new Shell(parent);
    child.setSize(200, 200);
    child.open();
  }
}

           
       

Thank with us