hi
i want to create and maintain links(arrowed lines) inbetween two or more Internal frames .these links(arrowed lines are created by dragging mouse from one internal frame to other internal frame :WAVE:
Printable View
hi
i want to create and maintain links(arrowed lines) inbetween two or more Internal frames .these links(arrowed lines are created by dragging mouse from one internal frame to other internal frame :WAVE:
to do this, you would probably have to keep track of both the location of both frames and the size of both frames. When you got those variables, you can calculate the shortest distance between them, and draw the corresponding line on the underlying JPanel.
Thanx for ur response but what about maintaining them while dragging frames?
i can use repaininting but please send some source code....
Regards Naren
Sorry, I have no code ready made for that, but maintaining arrows while you drag
an internal frame would require implemetation of the proper windowlisteners for the
internal frames, and those event handlers would in turn repaint the underlying pane.
thanx for ur suggestion sir