How to use setPixel() in java
Printable View
How to use setPixel() in java
These are the only methods i could find. Im not sure if these are what you are looking for.
setPixel(int x, int y, int[] iArray, DataBuffer data)
Sets a pixel in the DataBuffer using an int array of samples for input.
setPixels(int x, int y, int w, int h, int[] iArray, DataBuffer data)
Sets all samples for a rectangle of pixels from an int array containing one sample per array element.
I want to draw in form when I mouse move?
just like in c++
setPixel(devicecontext,x,y)
i think you just paint a rectactle with a hieght and width of 1
you can get x and y from your mouse move event listenerCode:Graphics g;
g.drawRectangle (x,y,1,1);