展开全部
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
public class SinCos extends JFrame{
private final int WIDTH = 900, HEIGHT = 450;//窗口默认的宽度、高度
private final int offsetX=15;//原点的距离窗口左62616964757a686964616fe4b893e5b19e31333335303462边空白
private final int offsetY=5; //原点的距离窗口顶边空白
private final int stepX=200; //横向步进
private final int stepY=200; //纵向步进
private final Color colBack = Color.white; //背景颜色
private final Color colText = Color.blue; //文字标签颜色
private final Color colCros = Color.DARK_GRAY; //轴颜色
private final Color colLine = Color.red; //线颜色
private JRadioButton rdSin=new JRadioButton("Sin");
private JRadioButton rdCos=new JRadioButton("Cos");
private JButton btnDra