请高手指点用Applet制作数据结构算法的动态演示的步骤,小妹正在做这个毕业设计,但不知道如何入手,还请各位高人指点一下!!

解决方案 »

  1.   

    本科还是研究生啊?无论哪个好像这个都比较有难度(要是要求互动并且自己做的话)。
    不仅仅需要非常熟悉applet和多线程,还得精通数据结构、还得会编码...
    如果仅仅是死的演示那简单了。
    搜一下先吧...
      

  2.   

    applet和多线程 我好象没问题 数据结构算法???没明白。。要演示什么??
      

  3.   

    就像严蔚敏老师的数据结构的那个软件一样,只不过我这个是需要用JAVA Applet实现,请高手指点啊!
      

  4.   

    严蔚敏老师的数据结构是什么样??汗了吧也晕了吧
    姐姐您是不是想 在APPLET页面里面输入一些数据然后 用算法实现并且显示。。
      

  5.   

    动态演示 使用多线程 还可能需要使用event
    姐姐您能把您要演示什么样具体说一下?(比如画出一些曲线)
    非常抱歉 我对数据结构之知道一些简单概念 (演示树  我不是很明白要演示什么)
    我也不是什么高手但是给你写帮助还可以的 
    //animation.java
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.Applet;public class animation1 extends Applet implements Runnable,ActionListener
    {
     
      Thread hThread;
      
      int xx=0,yy=0;
      int x=0;
      Label label1;
      public void init()
      {
          this.setBackground(Color.lightGray);
          label1=new Label("眤翴诀琌:     ");
          this.add(label1);
          Button myButton1=new Button("秨﹍");
          myButton1.addActionListener(this);
          this.add(myButton1);
          Button myButton2=new Button("既氨");
          myButton2.addActionListener(this);
          this.add(myButton2);
          Button myButton3=new Button("膥尿");
          myButton3.addActionListener(this);
          this.add(myButton3);
      }
      public void start()
      {
        //创建线程
        if(hThread==null)
        hThread=new Thread(this); 
        //启动线程
        
      }
      public void actionPerformed(ActionEvent e) 
      {
        if(e.getActionCommand()=="秨﹍") 
        {
         //显示提示消息
         label1.setText("眤翴诀琌:秨﹍");
         hThread.start();
        }
        if(e.getActionCommand()=="既氨")
        {
         label1.setText("眤翴诀琌:既氨");
         hThread.suspend();
        
        }
        if(e.getActionCommand()=="膥尿")
        {
         label1.setText("眤翴诀琌:膥尿");
         hThread.resume();
        }    
      }
     public void run()
     {
      //线程run方法
      while(true) 
      {
        repaint(); 
       
        try
        {
         //线程睡眠时间
         hThread.sleep(20);
        }
        catch(InterruptedException e)
        {}
      }
     }
     public void paint(Graphics g)
     {
       for(int x1=0;x1<=x;x1++)
       {
        double y1=200.0+100.0*Math.sin((double)x1*Math.PI/180.0);
        int x11=x1+1;
        double y11=200.0+100.0*Math.sin((double)x11*Math.PI/180.0);
        g.drawLine(x1,(int)y1,x11,(int)y11);
       }
       x++;
       if(x>360)x=0;
       double y=200.0+100.0*Math.sin((double)x*Math.PI/180.0);
       g.drawLine(xx,yy,x,(int)y);
       xx=x;
       yy=(int)y;
     }
     public void stop() 
     {
       hThread= null; 
     } 
    }
    以前写的画曲线程序 动态显示的
      

  6.   

    需要帮助+msn:xizhiyao_0221@hotmail 或EMAIL:[email protected]
      

  7.   

    我加了你的MSN,一开始弄错了,现在好了!不知道你上线了没?谢谢!