* at only first argument to determine how many tracks
* mixer will have.
*/
public static void main(String args[]) {
int numberOfTracks = 4;
JFrame f = new JFrame();
try {
UIManager.setLookAndFeel(
UIManager.getCrossPlatformLookAndFeelClassName());
} catch (Exception e) {
e.printStackTrace();
}
// This registers the customized L&F for the slider
// which represents a Player track.
UIManager.put("TrackSliderUI", "ejmf.toolkit.multiplayer.TrackSliderUI");
if (args.length == 1)
numberOfTracks = Integer.parseInt(args[0]);
SimpleMixer mixer = new SimpleMixer(numberOfTracks);
mixer.addContainerListener(
new SimpleMixerListener(f));
f.setJMenuBar(mixer.getMenuBar());
f.getContentPane().add(mixer);
f.setResizable(false);
f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
f.pack();
f.setTitle("EJMF Mixer");
f.setVisible(true);
}