Skip to main content

java graphics to show a 2d graph

1 reply [Last post]
xiaoyue
Offline
Joined: 2012-04-19
Points: 0

Hi,

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[3]. array[0],array[1] and array[2].

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.

AttachmentSize
sample.jpg6.74 KB

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hvongmongmanh90_lc
Offline
Joined: 2013-01-06
Points: 0

i need help. what is MASON ? I would like the program 'foraging behavior reviews' on MASON to simulate the mutil agent