Search:

Type: Posts; User: Mr.777

Search: Search took 0.08 seconds.

  1. Replies
    26
    Views
    5,237

    Re: Simple Google Maps like Image viewer in Java

    It jumps coz the size of image is too large and it takes your image to the mouse position whenever you try to drag it.
    Hint: Let mouse drag the image if mouse is inside the image coordinates.
  2. Replies
    26
    Views
    5,237

    Re: Simple Google Maps like Image viewer in Java

    1. Since your very first post, you are actually crying about getting your problem solved. No one here will actually solve your problem. We are here, not to do homework for anyone and neither any time...
  3. Replies
    26
    Views
    5,237

    Re: Simple Google Maps like Image viewer in Java

    Why don't you think this?
    It's easy to get your problem solved. Try to solve it on your own. Try try again and think what it's doing now and what do you want it to do. It's zooming canvas, not...
  4. Replies
    26
    Views
    5,237

    Re: Simple Google Maps like Image viewer in Java

    For me this code works fine. And it doesn't behave as it behaved previously.
    And your drawImage is working fine as you are only trying to draw image and it's working perfect. Well, i will recommend...
  5. Replies
    26
    Views
    5,237

    Re: Simple Google Maps like Image viewer in Java

    Read my above post. I've double posted, so read the second one.
  6. Replies
    26
    Views
    5,237

    Re: Simple Google Maps like Image viewer in Java

    public void mouseDragged(MouseEvent me) {
    dx = me.getX() - x;
    dy = me.getY() - y;
    }

    This is your current drag code, why are you subtracting x and y...
  7. Replies
    26
    Views
    5,237

    Re: Simple Google Maps like Image viewer in Java

    Well, i can not tell you, what to write but can guide you as forums rules don't allow to spoon feed. So, i can simply tell you one more thing, that your painComponent() function is drawing the image...
  8. Replies
    26
    Views
    5,237

    Re: Simple Google Maps like Image viewer in Java

    Okay let's say, in the very start, your image is at 0,0. Now when you drag it, you actually get image from 0,0 to start dragging. And when you released, you do nothing. You must get the current...
  9. Replies
    26
    Views
    5,237

    Re: Simple Google Maps like Image viewer in Java

    On mouse release you don't the current x,y coordinates of the image, so when you try to drag again, image jumps to it's original position to get dragged.

    You are actually zooming the canvas, so it...
Results 1 to 9 of 9