Help with mouse dragging in grid

Discussion in 'Java' started by jacobhot999@gmail.com, Dec 19, 2012.

  1. Guest

    http://pastebin.com/qw00TCd6
    (code if needed)

    I've created a grid, and a double array of my class gridBalls.
    gridBalls has a int type, and you pass to it a number to determine
    what to draw in the grid, like 0 blank, 1 ball etc.
    What would the code look like in my mousedragged if I wanted to lets say
    click on the slot [0] [0] on my grid (pretend its a ball), drag my mouse
    to the right and draw a horizontal line (type 3 in this example), or if I
    dragged my mouse bottom and it drew a vertical line (type 2)

    Thanks
    , Dec 19, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Davisro
    Replies:
    2
    Views:
    1,285
    Jim Corey
    Apr 23, 2004
  2. Wolfgang
    Replies:
    2
    Views:
    794
    S Manohar
    Feb 1, 2004
  3. Max
    Replies:
    7
    Views:
    9,076
  4. Claus Atzenbeck
    Replies:
    1
    Views:
    1,061
    Claus Atzenbeck
    Nov 26, 2004
  5. Erik Veenstra

    Simulating Mouse Dragging

    Erik Veenstra, Jul 29, 2005, in forum: Ruby
    Replies:
    6
    Views:
    547
    William James
    Jul 30, 2005
Loading...

Share This Page