Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
looka dicosta
Greenhorn
Posts: 21
  • 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: 5167
11
Java Netbeans IDE Opera
  • 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
Posts: 3195
78
  • Likes 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
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!