Paint or Fill a pixel with color

Greetings I am a very beginner with java 2D, I am going to design an applet simulator about artificial life. To start I want to know how to paint a pixel with any color. example

Graphics g

g.fillPixel(Point x, Point y, Color.ANY)

Thanks by your help.

Cordially

Andrei

Message was edited by:

andreihortua

[353 byte] By [andreihortuaa] at [2007-11-26 20:20:35]
# 1
g.drawLine(x, y, x, y)
CaptainMorgan08a at 2007-7-10 0:45:12 > top of Java-index,Security,Cryptography...
# 2
g.drawRect(x, y, 1, 1);
crwooda at 2007-7-10 0:45:12 > top of Java-index,Security,Cryptography...
# 3
The most efficient way to paint a pixel in Java2D is fillRect(x, y, 1, 1);Both drawLine and drawRect typically have higher overhead.Dmitri
dmitri_trembovetskia at 2007-7-10 0:45:12 > top of Java-index,Security,Cryptography...