This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to draw shapes with mouse?  RSS feed

 
shahidrasul shahid
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to draw shapes such rectangle , circle etc in my application with mouse according to size.
please any body help me to draw these shapes by mouse?
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what have you tried so far? Where exactly are you stuck?

The problem can be broken down to
-- detecting mouse events
-- custom painting
-- storing already drawn graphics for repeat, OR
-- drawing to an offscreen buffer

As I don't suppose you expected someone to write the entire code for you, do please help us to help you by being more specific about your needs.

Reading this page might help you to ask your question in a better way!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!