Results 1 to 4 of 4

Thread: setPixel()

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    163

    setPixel()

    How to use setPixel() in java
    Purushottam

  2. #2
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    163
    I want to draw in form when I mouse move?

    just like in c++

    setPixel(devicecontext,x,y)
    Purushottam

  4. #4
    Hyperactive Member CaptainPinko's Avatar
    Join Date
    Jan 2001
    Location
    London, Ontario, Canada
    Posts
    332
    i think you just paint a rectactle with a hieght and width of 1
    Code:
    Graphics g;
    g.drawRectangle (x,y,1,1);
    you can get x and y from your mouse move event listener
    "There are only two things that are infinite. The universe and human stupidity... and the universe I'm not sure about." - Einstein

    If you are programming in Java use www.NetBeans.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width