Hey, I'm a total newbie in SWT area and am stuck in a problem. What I want to do is pass a SWT Group type from one class A to another class B so that I can create an object of type B that is under the ownership of Group in class A.

Here is an example code:
class A{
.........
Group groupA = new Group(shell, ....);
B objB(groupA);
.........
}

class B{
.........
Group superGroup;
Group groupB = new Group(superGroup, ....);
// B Constructor
B(Group rGroup){
superGroup = rGroup;
}
// Now i create my text boxes within the ownership
// of groupB
.........
}

This is all I want to do, but I'm getting compilation error, what wrong have I done. Please provide a solution. Thanks !!!