import javax.swing.*;
+import java.awt.event.*;
+import java.awt.*;
-/*
- *
- *
- * @author Andersson, Andreen, Lanneskog, Pehrson
- * @version 1
- */
-
-public class MooToolbar {
+public class MooToolbar extends JToolBar implements ActionListener {
- /*
- * Creates the toolbar.
- */
- public MooToolbar () {
+ public MooToolbar() {
+
+ rewind = createButton("images/rewind.gif", "rewind");
+ add(rewind);
- }
+ playpause = createButton("images/play.gif", "play");
+ add(playpause);
+
+ stop = createButton("images/stop.gif", "stop");
+ add(stop);
+
+ 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) {
+
+
+ System.out.println(e.getSource());
+
+ /*if () {
+
+ } else if () {
+
+
+ } else if () {
+
+ } else if () {
+
+ }*/
+ }
+ private JButton rewind;
+ private JButton playpause;
+ private JButton stop;
+ private JButton fastforward;
}