tags:

views:

155

answers:

2

Hi, I write a project in Java using SWT. I would create temporary container for some controls. How to create composite control without parent object?

Sincerely, mykhaylo

+2  A: 

You can't, a Composite is a widget and needs a parrent, but you can create it on a Shell you will never open(), then use setParrent when you'll want to display it.

Lliane
It is work well. How I get children controls from shell object?
mykhaylo
shell.getChildren();
Lliane
A: 

One other option would be to create it in such a way that it cannot be seen, i.e. visible=false and excluded from layout, etc.

GreenKiwi