Search:

Type: Posts; User: MXA92

Search: Search took 0.10 seconds.

  1. Replies
    10
    Views
    2,043

    Re: Adding a mouse listener to my Draughts game

    Oh yeah, that was substantially better:


    public void mouseEntered(MouseEvent e)
    {
    ((Square)e.getSource()).enter();
    }

    Thank you again Norm :)!
  2. Replies
    10
    Views
    2,043

    Re: Adding a mouse listener to my Draughts game

    EDIT: CODE REMOVED
  3. Replies
    10
    Views
    2,043

    Re: Adding a mouse listener to my Draughts game

    Hmm, I'm not quite sure what you mean.
    I need the mouse listener to call the enter() method for the specific Square object that has called it :/
  4. Replies
    10
    Views
    2,043

    Re: Adding a mouse listener to my Draughts game

    I've worked out I need the row and column of the square the mouse is on (using e.getX() and e.getY() somehow?) and then I can just call the enter() method.

    ie. squares[1][2].enter() changes the...
  5. Replies
    10
    Views
    2,043

    Re: Adding a mouse listener to my Draughts game

    EDIT: Code Removed
  6. Replies
    10
    Views
    2,043

    Adding a mouse listener to my Draughts game

    EDIT: CODE REMOVED
Results 1 to 6 of 6