//<applet code ="Vibration.class" width=500 height=650></applet>
import java.awt.*;

public class Vibration extends java.applet.Applet //implements ActionListener
{
	
	static final int WIDTH = 440;
	
	static Freq_scrollbar f1 = new Freq_scrollbar(1);
	static Freq_scrollbar f2 = new Freq_scrollbar(2);
	
	static Ampl_scrollbar a1 = new Ampl_scrollbar(1);
	static Ampl_scrollbar a2 = new Ampl_scrollbar(2);
	
	static Phase_scrollbar p2 = new Phase_scrollbar();
	
	static Canvas_graph g1 = new Canvas_graph(WIDTH,100,.1,20,0,1);
	static Canvas_graph g2 = new Canvas_graph(WIDTH,100,.2,20,0,2);
	static Canvas_graph_total t1 = new Canvas_graph_total(WIDTH,200);

	
	public void init()
  {
    setLayout(null);
    
    g1.setBounds(10,30,WIDTH+1,100);
    f1.setBounds(10,140,WIDTH+1,25);
    a1.setBounds(WIDTH+20,30,25,100);
    g2.setBounds(10,200,WIDTH+1,100);
    f2.setBounds(10,310,WIDTH+1,25);
    a2.setBounds(WIDTH+20,200,25,100);
    p2.setBounds(10,362,WIDTH+1,25);
    t1.setBounds(10,420,WIDTH+1,200);
    
    add(g1);
    add(f1);
    add(a1);
    add(g2);    
    add(f2);
    add(a2);
    add(p2);
    add(t1);
 
    setVisible(true);
    System.out.println("Author: Jiri Hofman, FEL CTU, 2000");
  }
  
 
  public void start()
  {
  }
  
  public void stop()
  {
  }

  public void destroy()
  {
  }

  public void paint (Graphics g)
  {
  	g.setFont(new Font("arial", Font.PLAIN,12));
  	g.drawString("Amplitude 1",WIDTH-10,20);
  	g.drawString("Frequency 1",WIDTH/2-35,180);
  	g.drawString("Amplitude 2",WIDTH-10,190);
  	g.drawString("Frequency 2",WIDTH/2-35,350);
  	g.drawString("Relative phase",WIDTH/2-45,400);
  }
  
}