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 2 of 2

Thread: Lines in Graphics as an object?

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Lines in Graphics as an object?

    Are there any possibe way to create objects for Lines?
    Just like the:
    Rectangle rec = new Rectangle

    if there is... Please tell me how to (-:


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Lines in Graphics as an object?

    Line2D (Java Platform SE 6)

    Or just create your own class.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. [SOLVED] Java Graphics: Drawing one object into another
    By zaxahmed in forum Object Oriented Programming
    Replies: 5
    Last Post: August 22nd, 2011, 08:06 AM
  2. Graphics class NullPointerException Initialize Graphics Class??
    By bglueck in forum What's Wrong With My Code?
    Replies: 7
    Last Post: May 13th, 2011, 11:13 PM
  3. Reading from ResultSet to Object and from object Object Array
    By anmaston in forum What's Wrong With My Code?
    Replies: 4
    Last Post: April 7th, 2011, 06:11 AM
  4. How would you get a JTextArea to know how many lines it had?
    By javapenguin in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 20th, 2011, 07:58 PM
  5. My lines won't work!!!
    By The Mewzytion in forum What's Wrong With My Code?
    Replies: 5
    Last Post: July 2nd, 2010, 10:24 AM