IntelliJ Java IDE
The moose likes Swing / AWT / SWT / JFace and the fly likes Need help in making my Oval increase in size. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "Need help in making my Oval increase in size." Watch "Need help in making my Oval increase in size." New topic
Author

Need help in making my Oval increase in size.

Kei Teh
Greenhorn

Joined: Jan 28, 2012
Posts: 3
Hi guys! I need a little help in creating shapes.

Below is my code, but no matter what I do, I cannot make the Oval increase gradually (ie. once I run the program I should be able to see it increase). Any advice? Thanks for your help in advance.

Edit: I've added my whole code in just to make sure.




Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 26720
I think I ought to move this discussion to our GUIs forum.

You are nowhere increasing the size of the display. You have a drawing() method but you don’t appear to be calling it from anywhere.
Kei Teh
Greenhorn

Joined: Jan 28, 2012
Posts: 3
I thought of using for loop to increase the height and width of the oval by 2 as shown. Could it be I'm using it wrongly?
Michael Dunn
Rancher

Joined: Jun 09, 2003
Posts: 4041
> Could it be I'm using it wrongly?

yes.

what calls your drawing()

> I cannot make the Oval increase gradually

you need a swing.timer
Kei Teh
Greenhorn

Joined: Jan 28, 2012
Posts: 3
Michael Dunn wrote:> Could it be I'm using it wrongly?

yes.

what calls your drawing()

> I cannot make the Oval increase gradually

you need a swing.timer


thanks. i got it
 
 
subject: Need help in making my Oval increase in size.
 
Threads others viewed
Draw a curve in Java if only have 3 coordinates known.....Help !!
Drawing an oval
help with oval
one last try
Circle looks bad
IntelliJ Java IDE