Just introduce a package
The simplest code is:
import javax.swing *;. import org.jgraph *;. public class Test {public static void main (String [] args) {JFrame frame = new JFrame ( "Main Window"); JGraph graph = new JGraph (); JScrollPane scrollPane = new JScrollPane (graph); frame.setContentPane (scrollPane); frame.setSize (640,480); frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); frame.setVisible (true);}} will show a lovely interface