Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic

Help showing drawing items

 
Jeff Ciaccio
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi all,

I am trying to show a rectangle "flying" across a panel, but it just sits there Any suggestions?



and here is MyPanel:
 
Larry Frissell
Ranch Hand
Posts: 82
2
  • Mark post as helpful
  • send pies
  • Report post to moderator
The MyPanel should work as written, the box will move if the X and Y are incremented. So I would suggest inserting a print line statement in the setCurrentX, and setCurrentY to see what is happening. For example:
 
Campbell Ritchie
Sheriff
Posts: 48921
58
  • Mark post as helpful
  • send pies
  • Report post to moderator
You have had a similar post on the Swing forum, where I think we should continue the discussion. Please don't ask the same question twice.

Closing thread.
 
    Bookmark Topic Watch Topic
  • New Topic