aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Linking internal frames with a line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Linking internal frames with a line" Watch "Linking internal frames with a line" New topic
Author

Linking internal frames with a line

Abed Rabie
Ranch Hand

Joined: Jun 24, 2003
Posts: 74
Dear All,

hope all of you are ok.

My Problem is: "Linking internal frames with a line"

I'm in the process of making an ERD Diagram that show the tables of the databases and its relations.

I'm already did the entities or tables but I face a problem now which is:

How I can link or draw the relation line between the entities or tables??

So please advice.

looking forward to hear from you as soon as possible.

Thanks for you all

Aabed

Best regards


Abed Rabie
Pritam Barhate
Greenhorn

Joined: Nov 25, 2004
Posts: 15
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.
Abed Rabie
Ranch Hand

Joined: Jun 24, 2003
Posts: 74
Dear Pritam Barhate,

I red your message and I'm so glad of your reply but I don't understand something you write so may u explain it for me please.

What you mean by developing a custom component that show me the tables and relations??

Also I'm so sorry to say that it's not an open source project it's just an application we try to develop so are you interested to share me in that.

Thanks alot for your reply

Aabed
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Abed Rabie
Ranch Hand

Joined: Jun 24, 2003
Posts: 74
Dear friend Craig Wood ,

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".

Thanks alot for your help and your quick reply.

Best regards

Aabed
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535

[ November 30, 2004: Message edited by: Craig Wood ]
Abed Rabie
Ranch Hand

Joined: Jun 24, 2003
Posts: 74
Dear friend,

Thanks alot for your reply and helping me.

Best regards

Aabed
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Linking internal frames with a line