Touch Screen Games | Java Midp 2.0

private void updateGame() // Use touchX, touchY, touching for game logic

public void run() { while (running) { updateGame(); repaint(); try Thread.sleep(30); catch (InterruptedException e) {} } } java midp 2.0 touch screen games

protected void pointerPressed(int x, int y) playerX = Math.min(Math.max(x, 10), getWidth() - 10); shootRequested = true; private void updateGame() // Use touchX, touchY, touching