Hello,
In my application, I have created an extension of a Canvas:
class A extends Canvas
This component is rather big in memory, and needs to be displayed in several
panels of the application at the same time. For instance, as a child of
another Canvas and as a child of a TitleWindow simultaneously.
Currently, I recreate an instance of A every time I need it to be displayed.
Indeed, I tried to create a common instance (using a view locator pattern)
and reuse it everywhere in my application; however if I do this, when
setting this unique instance as a child of the TitleWindow, the "parent"
property is then sets to the TItleWindow, and not to the Canvas anymore. As
a result, it seems the same component can never be reused.
Do you have a solution to this? Am I using an incorrect approach to
components reuse?
Any insight would be much appreciated.
Thanks,
--
Seb