import javax.sound.sampled.*; import java.applet.Applet; import java.awt.*; import java.awt.event.*; public class Piiks2Rakend extends Applet implements ActionListener{ Button nupp=new Button("Piiksu"); public Piiks2Rakend(){ setLayout(new BorderLayout()); add(nupp); nupp.addActionListener(this); } public void actionPerformed(ActionEvent e){ try{ int kandesagedus =10000; int sagedus=440; //440 hertsi int nr=0; byte[] andmed=new byte[5*kandesagedus]; //5 sekundit while(nr