Use JGRAPH "Hello World!"

xiaoxiao2021-03-06  23

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

转载请注明原文地址:https://www.9cbs.com/read-43581.html

New Post(0)