• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help in making my Oval increase in size.  RSS feed

 
Kei Teh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 55366
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> 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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!