import javax.swing.*;
import java.awt.event.*;
+import java.awt.*;
+import java.awt.Color;
public class MooToolbar extends JToolBar implements ActionListener {
fastforward = createButton("images/forward.gif", "fast forward");
add(fastforward);
+ meas = createLabel("Measure");
+ add(meas);
+
+ beat = createLabel("Beats");
+ add(beat);
+
+ ticks = createLabel("Ticks");
+ add(ticks);
+
}
private JButton createButton(String imageLocation, String toolTip) {
return button;
}
+ private JLabel createLabel(String name) {
+ JLabel label = new JLabel(name);
+ return label;
+
+ }
+
public void actionPerformed(ActionEvent e) {
- Object ob = e.getActionCommand();
- if (ob == rewind) {
- } else if (ob == playpause) {
- JOptionPane.showMessageDialog(null, "playing");
+ /*if () {
+
+ } else if () {
+
- } else if (ob == stop) {
+ } else if () {
- } else if (ob == rewind) {
+ } else if () {
- }
+ }*/
}
private JButton rewind;
private JButton playpause;
private JButton stop;
private JButton fastforward;
+ private JLabel meas;
+ private JLabel beat;
+ private JLabel ticks;
}