Results 1 to 3 of 3
  1. #1
    fhos98 is offline Member
    Join Date
    Jan 2012
    Posts
    1
    Rep Power
    0

    Default How to make image face mouse?

    I know how to use the MouseMotionListener interface, but I don't know which class or interface to use to make an image that rotates.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: How to make image face mouse?

    Quote Originally Posted by fhos98 View Post
    I know how to use the MouseMotionListener interface, but I don't know which class or interface to use to make an image that rotates.
    You may wish to provide more detail, a lot more detail on your assignment and exactly where you're stuck. I can't see how anyone can offer any help based on what has been posted so far other than to suggest you look at the Swing graphics and Swing Timer tutorials.

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,559
    Rep Power
    25

    Default Re: How to make image face mouse?

    If you want to rotate an image when drawing it, look at the Graphics2D class. The API doc has lots of links to other classes that may be useful.

Similar Threads

  1. Replies: 4
    Last Post: 07-23-2011, 08:08 PM
  2. Replies: 9
    Last Post: 06-17-2011, 05:10 AM
  3. Check if image contains mouse
    By trishtren in forum Java 2D
    Replies: 2
    Last Post: 05-15-2011, 10:49 PM
  4. How to make object stop moving with mouse click
    By mackavelirip in forum New To Java
    Replies: 3
    Last Post: 05-06-2011, 03:23 AM
  5. Replies: 10
    Last Post: 10-14-2010, 01:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •