Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need to draw spiral within dynamically changing rectangle....  RSS feed

 
sumukha kris
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm doing a java project in which I have a rectangle which is drawn by the user by dragging the mouse and hence the size of the rectangle can vary for each execution. Now i need to draw a spiral within the rectangle according to the size of the rectangle so that when ever the rect is bigger the spiral has to be bigger and when smaller the spiral size should change accordingly.How can i do this?

Can anybody help me with this....

Thanks in advance,
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What specific parts of this are you having problems with? Swing components? Drawing? What do you have so far?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"sumukha" -

Welcome to the JavaRanch! We don't have many rules around the ranch, but we do have a policy on displayed names... Please adjust your displayed name to meet the JavaRanch Naming Policy. User names must consist of a first name and a last name.

You can change your user name here.

Thanks! and welcome to the JavaRanch!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!