import javax.swing.*;
import java.awt.event.*;
+import java.awt.*;
public class MooToolbar extends JToolBar implements ActionListener {
fastforward = createButton("images/forward.gif", "fast forward");
add(fastforward);
+
}
private JButton createButton(String imageLocation, String toolTip) {
JButton button = new JButton (new ImageIcon(imageLocation));
button.setToolTipText(toolTip);
button.addActionListener(this);
+ //JOptionPane.showMessageDialog(rewind.getActionEvent());
return button;
}
public void actionPerformed(ActionEvent e) {
- Object ob = e.getActionCommand();
- if (ob == rewind) {
- } else if (ob == playpause) {
- JOptionPane.showMessageDialog(null, "playing");
+ System.out.println(e.getSource());
+
+ /*if () {
+
+ } else if () {
+
- } else if (ob == stop) {
+ } else if () {
- } else if (ob == rewind) {
+ } else if () {
- }
+ }*/
}
private JButton rewind;
private JButton playpause;