java graphics to show a 2d graph
i am doing a p2p simulation. i have save the information about the nodes to another txt file. The sample data is like the data below:
3;//there are 3 connections
0;1;500; // Node 0 connect to Node 1 with 500 kbps
0;2;200;// Node 0 connect to Node 2 with 200 kbps
1;4;1000; // Node 1 connect to Node 4 with 1000 kbps
i have let the read file function which will read and then put the value to an array. array,array and array.
Now i want to display it which means that when i run the program, there will be a interface(JFrame) which will show which node is connected to which node. It will show something similar to the attachment that i have attached.
Can anyone teach me how to do this ? Thanks in advance.