public AlienTiles(long period) { super("AlienTiles"); // load the background MIDI sequence midisLoader = new MidisLoader(); midisLoader.load("mi", "Mission_Impossible.mid"); midisLoader.play("mi", true); // repeatedly play it Container c = getContentPane(); // default BorderLayout used atp = new AlienTilesPanel(this, period); c.add(atp, "Center"); addWindowListener(this); pack(); setResizable(false); setVisible(true); } // end of AlienTiles() constructor
public void windowClosing(WindowEvent e) { atp.stopGame(); midisLoader.close(); // not really required }