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

Issue with graphics2d  RSS feed

 
Dimitar Dimitrov
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there, I have the following issue: I have 2 images drawn in a JPanel ... I use Graphics2D for a rotation and translation for each images... I'd assigned different buttons for different images to operate with them... for example I have up/down/left/right for the one and w/s/a/d for the other... when I start the jframe and use the keys for moving... they move well but when I move the one the other one stays still... and opposite.. how to prevent that.. I know I need some kind of threading but I'm newbie with that... Thanks in advance
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without code, how can anyone guess what is being done wrong? Consider creating and posting an SSCCE (please click on and read the link).
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
In case you haven't already do so, please check out these tips on getting the most of the Ranch.
 
Dimitar Dimitrov
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


and this is the paintTank() method:



it is not the completed text.. I need to make changes.. so if you have any idea about the issue.. I'll be glad to hear it... thanks
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what does a tank have to do with the problem?

read the link provided.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!