I am new to java graphics, and am confused as to why my setSolor throws a nullpointer. Trying to do something simple like this:
public void drawEllipse(int x, int y, Color color){
Graphics g = null;
Graphics2D g2 = (Graphics2D) g;
g2.setColor(color);
Ellipse2D.Double ellipse = new Ellipse2D.Double(x, y,1,1);
g2.draw(ellipse);
}