graphics object
clearScreen()
{
Graphics g = getGraphics();
g.setColor(getBackground());
g.fillRect(0,0,getSize().width,getSize().height);
g.setColor(getForeground());
}
clearScreen(Graphics g)
{
g.setColor(getBackground());
g.fillRect(0,0,getSize().width,getSize().height);
g.setColor(getForeground());
}
Does both of these two method will work the same? i am not sure.

