My background for my game isn't displaying at all. I use a mac, do I have to do something different? Heres my Panel class:
At the moment my images are in the same folder as the .java files, and I use eclipse.package net.nivangerow.umadbro; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Panel extends JPanel implements ActionListener{ public Player p; Image img; Timer time; public Panel() { p = new Player(); addKeyListener(new AL()); setFocusable(true); ImageIcon i = new ImageIcon("/background.png"); img = i.getImage(); time = new Timer(5, this); time.start();] } public void actionPerformed(ActionEvent e) { p.move(); repaint(); } public void paint(Graphics g) { super.paint(g); Graphics2D g2d = (Graphics2D) g; g2d.drawImage(img, 0, 0, null); g2d.drawImage(p.getImage(), p.getX(), p.getY(), null); } private class AL extends KeyAdapter { public void keyReleased(KeyEvent e) { p.keyReleased(e); } public void keyPressed(KeyEvent e) { p.keyPressed(e); } } }