Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

it draws firstly circle and then after a second the circle disappears  RSS feed

 
Bobby Marvikuan
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my code it draws firstly circle and then after a second the circle disappears can anyone explain why does it do so??=/

cheers(:
 
Campbell Ritchie
Sheriff
Posts: 53773
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I always thought you should do your painting in a certain method, like this:-
 
Bobby Marvikuan
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:I always thought you should do your painting in a certain method, like this:-

Cheers But it does not make any difference it still disappears even if I do that way
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm confused about why you chose to call



rather than


 
Bobby Marvikuan
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:I'm confused about why you chose to call



rather than



I did not realize that there 's' in there cheers but it does not make any difference at all.(
 
Randall Twede
Ranch Hand
Posts: 4589
6
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
good try Paul. i am surprised he didnt get a compiler error for that mistake. as for the problem, i have no idea. seems pretty unusual to me
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's really not much point in posting code that isn't an SSCCE. We have no idea what the Complex class is or what it does.
 
Rob Spoor
Sheriff
Posts: 20895
81
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Randall Twede wrote:i am surprised he didnt get a compiler error for that mistake.

Because JComponent has both method paintComponent and paintComponents, each for its own purpose.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!