From your post I gather that you have added all the fields of a table to an internal frame. And Now you want to draw relationship lines between the two internal frmaes those contain the tables.
If that is is the case I don't think it is going to be easy. If internal frames would have reported "Dragg" events then you could have used some intelligent drawing making use of the fact that JDesktopPane extends JLayeredPane. But unfortunately Internal frames don't report any "Drag events."
Here youe longest shot could be extending JDesktopPane to provide a desktop pane that supports the relationship drwaing you want. But That would be tooooo deficult.
In best case, I suggest that you develop a custom component that can show your tables and their relationships.
If the application you are developing is an open source application I would be pleased to help in details.
Pritam Barhate<br />A magic combination of <b>Code</b> & <b>Fire</b> : <a href="http://www.jroller.org/page/codefire/Weblog" target="_blank" rel="nofollow">codefire</a><br />----------------------------------- <br />My Open Source Projects:<br /><a href="https://acemdi.dev.java.net/" target="_blank" rel="nofollow">AceMDI</a>: A easy, yet powerful MDI framework that manages windows as Tabs.
Thanks alot for your reply and you help. I appreciate your work too much.
But i have a question. If i need to link the internal cells of the jtable that will be drawn at this JInternal frame "Is it possible to do so".
I mean as in ERD diagram the line drawn between entities is pointing to certain field in the table so it's between two cells in two tables. Again "Is it possible to do this".