只需要引入一个包
最简单的代码就是:
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);
}
}
就会显示出一个可爱的界面