I'm having trouble accessing this
when writing an anonymous function.
public class Game extends JPanel {
public void action() {
new Thread(new Runnable() {
@Override
public void run() {
this.repaint();
}
}).start();
}
@Override
public void paint(Graphics g) {
// Paint stuff
}
}
I can't declare a new instance of my class because I can't set the class to my new instance of the class without getting static/non-static errors.