This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Draw dotted Rect

 
Sarone Thach
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
The Graphics class has a drawRect method. Does it have a method that will draw a rectangle but with dotted lines?
thanks,
Sarone
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not Graphics, but Graphics2D does... As long as you're using any version of the JDK newer than 1.2 you can just cast the Graphics parameter of the paint() method to a Graphics2D object.

 
Sarone Thach
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perfect! Thank you so much Nate.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic