import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.applet.Applet; import javax.sound.midi.*; public class Akordion5 extends JApplet implements MouseListener{ int algtoon=68; //Ab, akordioni nuppude vasak serv int kogus=12; int nupuvahe=50; int vasak=10; int yla=10; int nupudiameeter=30; final int kvint=7; JButton[][] nupud=new JButton[2][kogus]; Synthesizer synt; MidiChannel kanal; int valjus=100; public Akordion5(){ try{ synt=MidiSystem.getSynthesizer(); synt.open(); kanal=synt.getChannels()[0]; getContentPane().setLayout(null); for(int i=0; i72){toon-=12;} nupud[0][i]=new AkordioniNupp(toon-12, "/"); nupud[1][i]=new AkordioniNupp(toon); } for(int i=0; i