A dynamic demonstration of the process of Dijkstras algorithm for the shortest path of graphs

Source: Internet
Author: User
Tags cos sin

/**********************************************    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");                                                Pause button JButton go= new JButton ("Go");                                               Start button public Graph () throws Exception {setbounds (0, 0, 1380, 800);   Set size This.setbackground (Color.White);         Background color this.settitle ("Dijkstra algorithm dynamic process demonstration system based on OSPF protocol for the shortest path of the graph");                   This.setlayout (NULL); JLabel Lblnewlabel = new JLabel ("

A dynamic demonstration of the process of Dijkstras algorithm for the shortest path of graphs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.