主要是练习界面设置 界面布局 添加组件 设置组件 接口
算出正弦曲线的横纵坐标然后一点一点连接 画出整个图形
package com.lovo.homework2;
import java.awt.Font;
import java.awt.Graphics;
import javax.swing.JFrame;
import javax.swing.JLabel;
/**
* 类:界面上画出正玄曲线
* @author Abe
*
*/
@SuppressWarnings("serial")
public class SineCurve extends JFrame {
private double x;
private double y;
private double x1;
private double y1;
private int[] x2 = new int[1440];
private int[] y2 = new int[1440];
private JLabel[] lbl = new JLabel[5];
public SineCurve() {
this.setTitle("正玄曲线图");
this.setSize(600, 400);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
this.setResizable(false);
this.setLocationRelativeTo(null);
this.s