Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: java: need help to rotate an oval please

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default java: need help to rotate an oval please

    Hallo,

    i'm trying to rotate an oval in Netbeans (java program). I tried a lot of stuff but i can't seem to figure it out. Can anyone help me please? Note: i'm a java "idiot" so please keep it simple.
    Or even just typing the code for me would also be nice but please help!

    here is my code so far:

    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Polygon;
    import java.awt.geom.AffineTransform;

    public void paintComponent(Graphics g){
    g.setColor(new Color(205, 65, 65))
    g.fillOval(720, 420, 30, 40);
    }

    greetings,
    Lax
    Last edited by xzibit_lax; November 22nd, 2013 at 12:32 PM. Reason: forgot some code


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: java: need help to rotate an oval please

    Please read this topic to learn how to post code correctly and other useful tips for newcomers.

    We just had a very similar topic with almost the same initial approach (very little). Are you the same person restarting the topic with a different user name?

    Here's a tutorial that covers the subject rather well.

  3. #3
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: java: need help to rotate an oval please

    I'm not the same person, i discovered this forum yesterday. I guess my skill set/english is not even good enough to understand that tutorial. Looks like i'll be drawing a pig for my project instead of a teddybear then.. a pig is only circles and rectangles. But thanks for the time. I'll keep this forum in mind and tell people who have problems to perhaps post them here.

    regards,
    Lax

Similar Threads

  1. cant rotate image
    By deivisxm in forum What's Wrong With My Code?
    Replies: 4
    Last Post: November 21st, 2013, 04:09 PM
  2. how to rotate one by one jbuttton
    By DanaMax in forum What's Wrong With My Code?
    Replies: 8
    Last Post: October 8th, 2013, 03:28 AM
  3. rotate in java
    By game06 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: April 23rd, 2013, 06:14 PM
  4. So im making a freehand Line,Rect,Oval; but problems
    By Matta in forum What's Wrong With My Code?
    Replies: 1
    Last Post: September 20th, 2011, 07:25 AM
  5. Getting a red Oval to displayed on screen
    By warnexus in forum What's Wrong With My Code?
    Replies: 8
    Last Post: January 13th, 2011, 08:27 PM

Tags for this Thread