好像有,你下在jfreechart,里面有有各可运行的例子,其中好像动态正弦曲线图

解决方案 »

  1.   

    呵呵,cxz7531大哥,我不是想赶紧做完回家过年吗?
      

  2.   

    哈哈!! 我也想快点挣点分好过年,好了,给你调好了
    类文件
    import java.awt.Graphics;public class GraphApplet extends java.applet.Applet {
      double f(double x) {
        return Math.sin(x/12.0) * 200.0 / 4+100;
      }  public void paint(Graphics g) {
        for (int x = 0; x < getSize().width; x++) {
          g.drawLine(x, (int) f(x), x + 1, (int) f(x + 1));
        }
      }  public String getAppletInfo() {
        return "Draws a sin graph.";
      }
    }测试页面
    <html>
      <head>
          <title>Simple Graph (1.1)</title>
      </head>
      <body>
          <h1>Simple Graph(1.1)</h1>
          <hr>
          <applet code=GraphApplet.class width=900 height=400>
          </applet>
          <hr>
          <a href="GraphApplet.java">The source</a>.
      </body>
    </html>
      

  3.   

    建议你去看看JAVA自带的演示程序!!