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.

[550 byte] By [bail_wa] at [2007-11-27 11:22:07]
# 1

have you tried? try it first.

Yannixa at 2007-7-29 14:52:59 > top of Java-index,Java Essentials,New To Java...
# 2

i tired, and it doesn't work. thats why i am questioning

bail_wa at 2007-7-29 14:52:59 > top of Java-index,Java Essentials,New To Java...
# 3

> i tired, and it doesn't work. thats why i am

> questioning

then post a SSCCE.

http://mindprod.com/jgloss/sscce.html

Yannixa at 2007-7-29 14:52:59 > top of Java-index,Java Essentials,New To Java...
# 4

nvm it does work, i was mistakenly put it somewhere else.

Thanks

bail_wa at 2007-7-29 14:52:59 > top of Java-index,Java Essentials,New To Java...