java - Canvas and InputMap -
i'm building 2d game in java , decided use canvas on display images relevant current frame. i'm using canvas because i've heard more efficient in terms of time jpanel. true?
also, add input game through key bindings since key listeners cause focus issues , lower level construct: keylistener not working after clicking button (see answer). there way use key bindings canvas? or use keylistener.
you can't add keybindings awt.canvas, there isn't method implemented in api
you can add keylistener
change decision , use jpanel/jcomponent
Comments
Post a Comment