Quote Originally Posted by rohitjun View Post
Thanks Gopal and Bitto...

I understood from your code Gopal how to rebuild wiring when the component is moved. But i think i am in the step before of the component move step. Means i am just trying to connect two components through wiring. As to do wiring i have to pass the starting component and ending component in the wiring instance. What i have to impement in the mouse events of the component class to acheive this. I am sorry as i have very few experience of GUI designing.

Thanks
Rohit
What you can do is the moment the component is placed on another , update the connection status of both the components. Probably you can create 0 length wire. You need to store locations of connection points in wire object.
When the user moves any of this component , update both the end points in wire (if you don't know how to please ask) and just rebuild the wire(). Probably you can implement in mouse events of Component