ok here is my code i followed my instructors working example to the letter and i am getting this error
H:\Pong\src\pong\Controls.java:54: error: non-static variable frame cannot be referenced from a static context
frame.paper.draw();
1 error
i am a beginning Java student and i am not asking for anyone to do my project for me just some help solving this error thanks
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package pong; import java.awt.*; import java.awt.event.*; import javax.swing.*; /** *<p>Pong<p> *<p>The Game<p> *<p>Copyright; 2012<p> *<p>Alien Software<p> * @author Jason Miller * @version 0.5.1 */ public class Controls extends JFrame implements ActionListener{ private FlowLayout flo = new FlowLayout(); private JButton btnStart,btnStop; private Timer tmrMoveBall = new Timer(10,new BallMover()); private PongCollisions frame; public Controls(){ btnStart = new JButton("Start"); btnStop = new JButton("Stop"); this.setLayout(flo); add(btnStart); add(btnStop); btnStart.addActionListener(this); btnStop.addActionListener(this); } public Controls(PongCollisions frame){ this(); this.frame = frame; } @Override public void actionPerformed(ActionEvent ae) { if(ae.getSource() == btnStart){ tmrMoveBall.start(); }else{ tmrMoveBall.stop(); } } private static class BallMover implements ActionListener { @Override public void actionPerformed(ActionEvent ae) { frame.paper.draw(); } } }