Results 1 to 5 of 5
  1. #1
    nice7 is offline Member
    Join Date
    Dec 2011
    Posts
    2
    Rep Power
    0

    Red face need help for drawing...

    Hi!
    need help for drawing java application for:

    1) allows for placement of 2 points with the mouse (click the left button, the point is a circle of radius 5 pixels) and draw a square with a diagonal of two points.

    2)mouse click inside the square circle drawn with a different color, but outside of it - no.

    thank you in advance,mates

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,932
    Rep Power
    8

    Default Re: need help for drawing...

    And which part of this are you having trouble with? What have you tried? Where are you stuck?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    nice7 is offline Member
    Join Date
    Dec 2011
    Posts
    2
    Rep Power
    0

    Default Re: need help for drawing...

    Quote Originally Posted by KevinWorkman View Post
    And which part of this are you having trouble with? What have you tried? Where are you stuck?
    mainly in drawing the square with two diagonal points...

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,932
    Rep Power
    8

    Default Re: need help for drawing...

    Okay, still, which part of that? Can you draw anything at all? Can you draw a square? Can you use a MouseListener? Can you get input from a MouseListener and use it in paintComponent?

    Break your problem up into smaller pieces, and create an SSCCE that demonstrates the piece you're stuck on.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: need help for drawing...

    I think you might be expected to show your workings...

Similar Threads

  1. Drawing an arc
    By berkeleybross in forum Java 2D
    Replies: 10
    Last Post: 12-09-2010, 01:32 AM
  2. Drawing out triangles
    By leiferouis in forum New To Java
    Replies: 24
    Last Post: 01-16-2009, 08:18 PM
  3. drawing images
    By diggitydoggz in forum New To Java
    Replies: 4
    Last Post: 01-02-2009, 03:15 AM
  4. Drawing a map
    By Karp in forum AWT / Swing
    Replies: 4
    Last Post: 11-07-2008, 12:26 PM
  5. Help with 2-D Drawing
    By Deathmonger in forum New To Java
    Replies: 4
    Last Post: 06-18-2008, 02:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •