I have written some java classes to generate a random network.
The network is made of : 200 nodes . Each node has a maximum of 50 neighbors.
What i want is to Randomly chose a node from that network and GRAPHICALLY show it with its one hop neighbors and its second hop neighbors.
I have these information saved in the code since each Node has 2 arraylists, one to save its one hop neighbors, and another to save it second hop neighbors. I have never used java to draw before, can you please tell me what classes i should use in order to get what i want ? thank you :)

7 Years
Discussion Span
Last Post by Taywin

Look at the example inside java jdk package jdk1.7.0/demo/applets/GraphLayout/example4.html Earlier versions also include this example.


If it would work for you to get a jpeg (or other format) displaying the graphs, consider using the DOT language.


You need to come up with a design of display first. Then you can aim to create a graphic for it. You could simply use 2D graphic to display which is not difficult to do. The main issue for you is how you want it to be presented. What constraint of display in term of size of display, layout, etc. Programming part for this graphic display is not that important.

Edited by Taywin: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.