Bookmark Topic Watch Topic
  • New Topic

Draw a rectangle in JPanel using Mouse  RSS feed

 
Subitha Sangar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Report post to moderator
Any one could please help me to give idea "how to draw a rectangle using mouse in Jpanel" and it should allow to draw more than one rectangle or other shapes.. if anyone have sample code please give it and help me... thanks in advance.
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Report post to moderator
I'm sorry, but we don't do homework assignments for you. Please show us what you have tried so far. First of all, do you know how to create a window? Do you know how to capture mouse events? These are the two main things you will need to do in order to complete this project. If you encounter problems, please come back with specific questions. Please look here for suggestions on how to ask a question in order to get the kind of answer you want.

Layne
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
CLosing this cross-post.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!