M
Martijn Mulder
I have 20 components from a common base that respond to mouse input. Only one
component is active at a time and is accessed through a central component that
is assigned one of the 20 instances.
What is the best way to organize the mouse input? I can
1. add a MouseListener to every component at startup, or
2. add a MouseListener to the central component every time another component
gets active.
Is there a penalty on either method in terms of performance, memory consumption
or otherwise?
component is active at a time and is accessed through a central component that
is assigned one of the 20 instances.
What is the best way to organize the mouse input? I can
1. add a MouseListener to every component at startup, or
2. add a MouseListener to the central component every time another component
gets active.
Is there a penalty on either method in terms of performance, memory consumption
or otherwise?