import java.applet.Applet; 
import java.awt.*; 
import java.awt.event.*;
import Mathd;

public class H3OD1 extends Applet implements ActionListener
{
 double a;
 double b;	
 Label s1;
 TextField t1;
 Label s2;
 TextField t2;

	public void init()
	{
	s1=new Label("Derece cinsinden aciyi giriniz : ");
	t1=new TextField(15);
   
        s2=new Label("0 ile 1 arasinda arc giriniz    : ");
	t2=new TextField(15);
	add(s1);
	add(t1);
	add(s2);
	add(t2);
        t1.addActionListener(this);
        t2.addActionListener(this);
	}

	public void actionPerformed(ActionEvent e)
	{
	Double sayi1=new Double(t1.getText() );
        a=sayi1.doubleValue();
        Double sayi2=new Double(t2.getText() );
        b=sayi2.doubleValue();
        t1.setText("");
        t2.setText("");
	repaint();
	}

	// trigonometrik fonksiyonların derece cinsinden yazılmış hali
	 public void paint(Graphics g) 
	 { 
	 g.drawString("sin("+a+") : " + Mathd.sind(a),35,70);
	 g.drawString("cos("+a+") : " + Mathd.cosd(a),35,90);
	 g.drawString("tan("+a+") : " + Mathd.tand(a),35,110);
  	 g.drawString("asin("+b+"): " + Mathd.asind(b),35,130);
  	 g.drawString("acos("+b+"): " + Mathd.acosd(b),35,150);
  	 g.drawString("atan("+b+"): " + Mathd.atand(b),35,170);
  	 }
 }
