Creating A Metronome in Java PDF
Creating A Metronome in Java PDF
import javax.swing.JLabel;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JSlider;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.border.TitledBorder;
public Metronome() {
super("Metronome App");
// code to use the operating system look.
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
SwingUtilities.updateComponentTreeUI(this);
} catch (Exception e) {
System.err.println(e);
}
bBeats.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
generateBeats(sBPM.getValue(), sDuration.getValue());
}
});