Results 1 to 10 of 10

Thread: Rotating Image?

  1. #1
    sciguy77 is offline Member
    Join Date
    Jan 2009
    Posts
    16
    Rep Power
    0

    Default Rotating Image?

    Hi,

    How would I make an applet that has a loop that rotates an image clockwise forever?

    Thanks :)

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

    Default

    Have you looked at the affinetransform class? It might be able to help you here.

  3. #3
    sciguy77 is offline Member
    Join Date
    Jan 2009
    Posts
    16
    Rep Power
    0

    Default

    Just did, but honestly it doesn't make much sense to me. If you haven't noticed, I'm new to JAVA. :)

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

    Default

    Well welcome to Java. I suggest you go through the tutorials until it does make sense to you. Much luck!

  5. #5
    sciguy77 is offline Member
    Join Date
    Jan 2009
    Posts
    16
    Rep Power
    0

    Default

    Yeah, I'm reading a book on it. Fortunately it makes a little bit of sense to me because I used MIT's Scratch a few years ago. Since then I've mainly worked in other languages, but I love the idea of Java Applets so much I decided to see what I could learn.

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

  7. #7
    sciguy77 is offline Member
    Join Date
    Jan 2009
    Posts
    16
    Rep Power
    0

    Default

    Thanks a lot. I just read through it all. It looks like that that rotate function is by too high a degree. So how would I make an image slowly rotate in a loop? Sorry, I'm still trying to figure this all out. :)

    Thanks for all your help.

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

    Default

    It looks like that that rotate function is by too high a degree
    I have no idea what you mean by this.

    So how would I make an image slowly rotate in a loop?
    If this is Swing, I'd use a Swing Timer. The same tutorials will have a section on this beast.

  9. #9
    sciguy77 is offline Member
    Join Date
    Jan 2009
    Posts
    16
    Rep Power
    0

    Default

    Hmmm. I'm using TextPad. Is Swing free and good for applets?

    Oh, and by degree I mean that the image will rotate all at once by 90 degrees then stop, but I want to rotate it in a continuous loop by 2-5 degree increments. Sorry if I was unclear. :)

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

    Default

    Swing is a standard component of core Java, so yes it is "free" and great for applets, or I should say JApplets. It's not simple though, and you'll need to go through the Sun Swing tutorials to learn more.

Similar Threads

  1. Rotating an image
    By lackofcolor in forum Java 2D
    Replies: 3
    Last Post: 02-27-2009, 11:54 PM
  2. Rotating objects in Java Applets
    By Unome in forum Java Applets
    Replies: 1
    Last Post: 10-17-2008, 07:35 AM
  3. Rotating and flipping an image in SWT
    By Java Tip in forum SWT
    Replies: 0
    Last Post: 07-02-2008, 08:01 PM
  4. Replies: 0
    Last Post: 01-08-2008, 05:29 PM
  5. Two Problems Rotating and collision detection help
    By jaferris in forum Java Applets
    Replies: 2
    Last Post: 01-07-2008, 11:19 PM

Posting Permissions

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