Search:

Type: Posts; User: Norm

Search: Search took 0.13 seconds.

  1. Replies
    9
    Views
    1,112

    Re: Beginner java problem

    Read the API doc for the MouseMotionListener interface to see what methods it uses.
    Compare that with what the MouseListener interface uses.

    Using a MouseAdapter can be convenient but it...
  2. Replies
    9
    Views
    1,112

    Re: Beginner java problem

    Is the variable's value changing when the mouse is released?
    Try debugging the code by adding some println statements to print out the value of the variable when it is changed and when it is used,...
  3. Replies
    9
    Views
    1,112

    Re: Beginner java problem

    Code the call to repaint like this:
    repaint();
    when you want the paintComponent() method to be called.
  4. Replies
    9
    Views
    1,112

    Re: Beginner java problem

    See the API doc for the Component class's repaint() method. Don't use any args.
  5. Replies
    9
    Views
    1,112

    Re: Beginner java problem

    There is a listener for mouse released. Have it tell the paintComponent method not to draw the text.
    You need to call the repaint() method so that the jvm will call the paintComponent method to...
Results 1 to 5 of 5