aspose file tools*
The moose likes Java in General and the fly likes DrawOval help please? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "DrawOval help please?" Watch "DrawOval help please?" New topic
Author

DrawOval help please?

Drake Silver
Ranch Hand

Joined: Apr 21, 2002
Posts: 80
hi.
I'm trying to draw an oval ..and it works.
I can fill it, resize it using a slider to increase it's radius or decrease the radius.
My problem right now is that even though it resizes, and I have it set to the middle of the panel, when I increase the radius past the panels hieght and width the circle stays in the middle, and it goes beyond the panels borders...not good.
I want to be able to shift the circle's position up and to the left if the radius is greater than the panel's hieght and width.
This is my code so far in the model-view approach.


"Shh, Zog....here come one Now!"
Drake Silver
Ranch Hand

Joined: Apr 21, 2002
Posts: 80
I've changed the forloop to look like this:
But I still et no reaction...
It has occured to me that the forloop is in contradiction with the cModel function.
While the cModel may try to grow larger, the for loop is trying to shrink it...so My for loop is also wrong...
Any ideas on how to get the circle to move the right and left when the circles size is greater than the panels height and width?
[ March 13, 2003: Message edited by: Drake Silver ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DrawOval help please?
 
Similar Threads
A challenge in components layout
help with oval
JTextFields & storing data
Graphics2D g2 = (Graphics2D)g;
problem in creating more than one objects