Results 1 to 5 of 5
  1. #1
    mneskovic is offline Member
    Join Date
    Apr 2010
    Posts
    57
    Rep Power
    0

    Question To make image move

    I have an assignment. I have to make an image in Java applet to round around the ellipsis and a counter to count circles. I draw the ellipsis and imported the image, but I don't how to make it rounding around the ellipsis. Please, help me, it is very important for me... :o

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,429
    Rep Power
    7

    Default

    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  3. #3
    mneskovic is offline Member
    Join Date
    Apr 2010
    Posts
    57
    Rep Power
    0

    Red face

    This code is all I have written:

    Java Code:
    import java.applet.Applet;
    import java.awt.*;
    import java.net.*;
    
    public class zadatak extends Applet {
        int width;
        int height;
        Image rabbit;
        URL base;
        MediaTracker mt;
    
        public void init() {
    
            width = getSize().width;
            height = getSize().height;
            setBackground(new Color(60,179,113 ));
            mt = new MediaTracker (this);
            try {
                   base = getDocumentBase();
             }
            catch (Exception e) {}
            rabbit = getImage(base, "White_Rabbit1.gif");
                      mt.addImage(rabbit,1);
                        try {
                   mt.waitForAll();
              }
            catch (InterruptedException  e) {}
                  Button button = new Button("Start");
            add(button);
            Button button1 = new Button("Stop");
            add(button1);
        }
        public void paint(Graphics g) {
            g.setColor(new Color(105,105,105));
            g.fillArc(100, 100, 550, 450, 0, 360);
            g.setColor(new Color(60,179,113 ));
            g.fillArc(150, 150, 450, 350, 0, 360);
            g.drawImage(rabbit, 100, 325, this);
            g.setColor(new Color(0,100,0));
    
           }
        }
    I hope you can help :o

    Greetings!

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

    Default

    too many cross-posts....

  5. #5
    mneskovic is offline Member
    Join Date
    Apr 2010
    Posts
    57
    Rep Power
    0

    Default

    I know and I'm sorry, but, like I said, it's very important for me... :o

Similar Threads

  1. Help with Move Shape
    By romina in forum AWT / Swing
    Replies: 2
    Last Post: 12-09-2010, 04:25 AM
  2. Some question to make Image Viewer
    By BluXit in forum New To Java
    Replies: 5
    Last Post: 04-14-2010, 05:29 AM
  3. Replies: 5
    Last Post: 11-02-2008, 07:41 AM
  4. Replies: 1
    Last Post: 01-15-2008, 08:12 PM
  5. How do I make My ball to move randomly?
    By whdbstjr90 in forum New To Java
    Replies: 4
    Last Post: 12-31-2007, 06:32 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
  •