File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "DrawOval help please?" Watch "DrawOval help please?" New topic

DrawOval help please?

Drake Silver
Ranch Hand

Joined: Apr 21, 2002
Posts: 80
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, 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 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:
subject: DrawOval help please?
It's not a secret anymore!