1

Relationship is one to one

I want to implement UI like as image which attach my two tables; im using JAVA swing to implement a drag and drop User interface for users to generate a database xml code e.g. DB Designer Fork.

Have implemented design of tables just wanted to get idea how to make a line which will be attached to the table han onclick.

Asdakamessoy
  • 87
  • 4
  • 12
  • i haven't tried , i am thinking how to make object attached to the other object – Asdakamessoy Apr 28 '13 at 19:23
  • It will be hard to help without knowing more about your problem, but more importantly, I think that you may be a bit premature in asking your question. Shouldn't you better define your problem and at least read up on the libraries involved first including the MouseListener and Swing drawing tutorials? You will get much better answers if you can ask much more specific questions, I think. – Hovercraft Full Of Eels Apr 28 '13 at 19:40

1 Answers1

1

This example uses drawLine() to connect JInternalFrame instances in a JDesktopPane, but you can draw() any desired Shape. PointyThing illustrates a common line decoration.

Also consider an existing library, as suggested here.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045