This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I want to draw circle with mouse dragged in below program.

 
looka dicosta
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello Everyone,

My below program is capable of drawing polygon with mouse clicked and pressed. Now I want to draw circle in this program when mouse is dragged.

It will be very appreciable if you can add changes to current code only.



Thanks in advance
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
looka dicosta wrote:
Hello Everyone,

My below program ...


... obtained at http://stackoverflow.com/questions/13507867/drawing-nonoverlapping-n-sided-polygon-circles-and-ellipse-with-mouse-on-jpane
 
Tony Docherty
Bartender
Pie
Posts: 2878
59
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are NotACodeMill (← click) but we will advise you on how to write the code yourself.

I suggest you start by reading a tutorial on mouse listeners and then a tutorial on 2D graphics
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic