/********************************************** 2015.1.9---1.12 by yzk ************************************************************************/
<pre name="code" class="java">import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.GeneralPath;
import java.lang.Thread;
import java.lang.Runnable;
public class init
{
public static void main(String[] args) throws Exception
{
//Graph g2=new Graph();
// login my=new login();
Graph g1=new Graph();
// Thread my=new Thread(g2);
// my.start();
//g1.gos();
// g2.start();
// g1.readin();
// g1.play();
//g1.setVisible(true);
}
}
import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.GeneralPath;
import java.lang.Thread;
import java.lang.Runnable;
public class Graph extends JFrame
{
public static int wait=0;
JButton stop= new JButton("STOP"); //暂停按钮
JButton go= new JButton("GO"); //开始按钮
public Graph ()throws Exception
{
setBounds(0, 0, 1380, 800); //设定大小
this.setBackground(Color.WHITE); //背景色
this.setTitle("基于OSPF协议的有向图最短路Dijkstra算法动态过程演示系统");
this.setLayout(null);
JLabel lblNewLabel = new JLabel("<html>最<br>短<br>路<br>算<br>法<br>动<br>态<br>过<br>程");
lblNewLabel.setFont(new Font("长城行楷体", Font.BOLD, 60)); //标签相关设置
lblNewLabel.setVerticalAlignment(SwingConstants.TOP); //置顶
lblNewLabel.setForeground(new Color(0, 0, 0));
lblNewLabel. setBounds(20,0,90,800);
add(lblNewLabel);
Gra temp=new Gra();