• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

questions on drawing

 
tan kian
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all, i want to draw out a different shape depending on what key the user pressed, but how do i draw outside of the paint() method? for example, when the user presses 1 on the handphone(emulator), i draw out a rectangle. i tried to check for the key been pressed in paint(), but its like paint() is only been called when the MIDlet starts up, and i can only press a key after everything has been drawn, so nothing gets drawn out.

 
tan kian
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
stupid me i placed the repaint() in the wrong place haha got it working now
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by tan kian:
stupid me i placed the repaint() in the wrong place haha got it working now


Nah, not stupid, just normal, we always put things in the wrong place. By the way, where are your car keys?

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic