Next problem: in my painter methods, frame.getGraphics().setColor(Color.red) seems to get ignored. I can only paint in black.
edit: apparently you need a new graphics object (note the .create()):
Code
public static void fillSq(JFrame frame, Point pt, Color col) { //Point is center
Graphics gr=frame.getGraphics().create();
gr.setColor(col);
int centerx=(int)pt.getX();
int centery=(int)pt.getY();
gr.fillRect(centerx-Grid.SIDE/2, centery-Grid.SIDE/2, Grid.SIDE, Grid.SIDE);
}
dont really get why, though
This post was edited by tt_toby on May 15 2013 06:30pm