I'm writing a graphic application, with java, swt and osgi. The bundle A holds the application main window. Depending on the selection of the user, a different user interface must be loaded. That is, the different GUI are in different bundles. So the main bundle A calls the bundle B to draw the new graphic interface. The bundle B contains many classes, SWT controls that extend the Composite class. This controls need a parent to draw to. The problem here is, the bundle B needs to draw on the bundle A. I tried to sends the parent composite that will hold the new interface from A to B, but when B creates the new control, it crashes.
Any idea? How to solve this problem?