Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Drawing a rectangular box  RSS feed

 
Manoj Raghuwanshi
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am new to Swing.I want to draw a rectangular box of dotted line on a frame
by dragging the mouse.How to do this in swing?
Thanks
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pretty much the same as drawing in the AWT except you get double buffering. And Swing overrides the update method so we are advised not to override it.
The
Trail: 2D Graphics is a guide to the Graphics2D resources but these are equally available in the AWT.
 
Manoj Raghuwanshi
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!