|
@@ -4,7 +4,7 @@ import java.awt.*;
|
|
import javax.swing.*;
|
|
import javax.swing.*;
|
|
import javax.swing.event.*;
|
|
import javax.swing.event.*;
|
|
import java.awt.event.*;
|
|
import java.awt.event.*;
|
|
-import javax.imageio.ImageIO;
|
|
|
|
|
|
+import javax.swing.ImageIcon;
|
|
|
|
|
|
public class Controls extends JPanel implements Observer
|
|
public class Controls extends JPanel implements Observer
|
|
{
|
|
{
|
|
@@ -24,15 +24,8 @@ public class Controls extends JPanel implements Observer
|
|
this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
|
|
this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
|
|
this.setPreferredSize(new Dimension(1280,75));
|
|
this.setPreferredSize(new Dimension(1280,75));
|
|
this.setMinimumSize(new Dimension(320, 75));
|
|
this.setMinimumSize(new Dimension(320, 75));
|
|
- this.play = new JButton();
|
|
|
|
- try
|
|
|
|
- {
|
|
|
|
- Image img1 = ImageIO.read(getClass().getResource("src/main/resources/playbutton.jpg"));
|
|
|
|
- play.setIcon(new ImageIcon(img1));
|
|
|
|
- } catch (Exception e)
|
|
|
|
- {
|
|
|
|
- System.out.println(e);
|
|
|
|
- }
|
|
|
|
|
|
+ ImageIcon icon1 = new ImageIcon("src/main/resources/playbutton.jpg");
|
|
|
|
+ this.play = new JButton(icon1);
|
|
play.addActionListener(new ActionListener()
|
|
play.addActionListener(new ActionListener()
|
|
{
|
|
{
|
|
public void actionPerformed(ActionEvent e)
|
|
public void actionPerformed(ActionEvent e)
|