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.


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

Results 1 to 2 of 2

Thread: Rectangle + Origo

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Thanked 0 Times in 0 Posts

    Default Rectangle + Origo

    Someone who can help me to write and explain a code to write a class that handles rectangle rectangles with height, width, position and girth. The width and the height is set by the rectangle is created and the position means automatically to the origin x = 0 and y = 0. Using this method can move the rectangle changes.

    I have write this code now, as you will see Im an very big noob:

    public class Rectangle
       public int length=0;
       public int height=0;
       public int width=0;
    public Rectangle(int x, int y
    public Rectangle(int x, int y, int z)

  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Washington, DC
    My Mood
    Thanked 698 Times in 595 Posts

    Default Re: Rectangle + Origo

    I'm not really sure what your actual question is?
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

Similar Threads

  1. Rectangle/Ellipse program help
    By ja3n in forum AWT / Java Swing
    Replies: 1
    Last Post: March 1st, 2012, 05:51 AM
  2. Gradual appearance of Rectangle...
    By rdheepan in forum Web Frameworks
    Replies: 5
    Last Post: January 13th, 2012, 12:07 AM
  3. Unable to draw a rectangle
    By n00b in forum AWT / Java Swing
    Replies: 3
    Last Post: November 1st, 2011, 08:32 AM
  4. Rectangle questions
    By stacksofamber in forum Java Theory & Questions
    Replies: 3
    Last Post: September 5th, 2011, 01:43 PM
  5. Dropping to graphic element dragged from JList
    By tua1 in forum AWT / Java Swing
    Replies: 1
    Last Post: November 29th, 2008, 08:22 AM

Tags for this Thread