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

Thread: Unable to draw a rectangle

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    19
    My Mood
    Fine
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Unable to draw a rectangle

    here is the simple test code :-
    import java.awt.Graphics;
    import java.awt.geom.*;
     
    public class test  
       {
         Graphics g;
         public void blah()
         {
     
     
             g.draw(new Rectangle2D.Double(20, 30, 300, 100));
     
     
            }
     
         }
    error - cannot find symbol- method draw...
    Plz Help
    Regards


  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: Unable to draw a rectangle

    Can you give us a link to the API for the Graphics.draw(Rectangle2D.Double) method?
    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!

  3. #3
    Junior Member
    Join Date
    Oct 2011
    Posts
    19
    My Mood
    Fine
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Unable to draw a rectangle

    OK this problem is solved now
    i used other method to make the rectangle.
    Thnx anyway...

  4. #4
    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: Unable to draw a rectangle

    Quote Originally Posted by n00b View Post
    OK this problem is solved now
    i used other method to make the rectangle.
    Thnx anyway...
    Thanks anyway? That's exactly what I was trying to get you to see...
    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. Rectangle questions
    By stacksofamber in forum Java Theory & Questions
    Replies: 3
    Last Post: September 5th, 2011, 12:43 PM
  2. Dragging and Dropping Rectangle - GUI
    By cjct927 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: June 8th, 2011, 09:59 AM
  3. Change the random draw line here for a mouseListener draw
    By Panda23 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 10th, 2011, 03:29 AM
  4. grow a rectangle in java
    By Khoatic in forum Java Theory & Questions
    Replies: 2
    Last Post: September 8th, 2010, 06:13 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