Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Replies
    24
    Views
    2,082

    Re: Draughts using mouse listener problem

    Allow me to doubt that. The code has several copies of this statement that you did not know about:


    throw new UnsupportedOperationException("Not supported yet.");
  2. Replies
    24
    Views
    2,082

    Re: Draughts using mouse listener problem

    If you had written the code then I would expect you to know about the code and what it contained.
    I was making assumptions that let me waste a lot of time chasing ghosts.
  3. Replies
    24
    Views
    2,082

    Re: Draughts using mouse listener problem

    You seem to have left all that out at the start of this thread.
  4. Replies
    24
    Views
    2,082

    Re: Draughts using mouse listener problem

    That exception is from your code!!!

    Where did you get this program from? Obviously you didn't write it.
  5. Replies
    24
    Views
    2,082

    Re: Draughts using mouse listener problem

    Post the full text of the error messages
  6. Replies
    24
    Views
    2,082

    Re: Draughts using mouse listener problem

    I only added // in front of the throw statements.

    The code works for me as I described in post #10
  7. Replies
    24
    Views
    2,082

    Re: Draughts using mouse listener problem

    All of them in the mouse listener methods.
  8. Replies
    24
    Views
    2,082

    Re: Draughts using mouse listener problem

    Can you explain what is supposed to happen when the mouse moves over the board? The posted code throws an exception for all the mouse movements.

    When I removed the exceptions and move the mouse,...
  9. Replies
    24
    Views
    2,082

    Re: Draughts using mouse listener problem

    I do not see a main() method in the code you have posted.
    Please make a small complete program that compiles, executes and shows the problem. Remove any code not related to this problem.
  10. Replies
    24
    Views
    2,082

    Re: Draughts using mouse listener problem

    I don't know what a FocusManager is and don't think I have ever used one. I have added focus listeners for debugging purposed to keep track of when components get the focus.
  11. Replies
    24
    Views
    2,082

    Re: Draughts using mouse listener problem

    Go to the API doc for the Component class and Find Focus. There is a link that will tell you about the Focus subsystem
  12. Replies
    24
    Views
    2,082

    Re: Draughts using mouse listener problem

    For a listener to work, the component must have the focus. Do the components with the listeners have the focus when the code is exectued?
Results 1 to 12 of 12