I need help please with arrows Graphics

I want to creat a flow diagram in java swing.

the nods will be a JButtons, and between this buttons I'll paint arrows with Graphics.

I want to create this dinamic (the button as massege, in my database I have columns names: msg_id, msg_number):

button(msg_id = 1, msg_number =0)

|||

b1 b2 b3(b1 > msg_id =2, msg_number = 1)

||

b1.1 b3.1(b1.1 --> msg_id = 3, msg_number = 2)

|

b1.1.1(b1.1.1 --> msg_id = 4, msg_number = 3)

How can I calculate and create dinamic way the arrows order between the buttons? (I have code that create an arrow http://forum.java.sun.com/thread.jspa?forumID=57&threadID=656349).

I wrote recursia method:

publicvoid myMethod(Integer msg_id)

{

// MsgStatements - class that select all msgIds to list where

// msg_number = msg_id

MsgStatements msgStatements =new msgStatements();

msgStatements.getMsgSons(msg_id);

List<Integer> sons = msgStatements.getMsgSons();

for(int index = 0; index < sons.size(); index++){

System.out.println(sons.get(index));

//myMethod(sons.get(index));

}

}

[1538 byte] By [yael800a] at [2007-11-26 16:31:09]
# 1
I also want the same if any body know please reply I want to map different fields in two lists by arrows how can i achieveit. if know please let me know
schooltiger@walla.coma at 2007-7-8 22:55:40 > top of Java-index,Desktop,Core GUI APIs...