/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author turing */ import javax.microedition.lcdui.*; public class RuuduJoonistaja extends Canvas { int x = 100, y = 150; protected void paint(Graphics g) { g.setColor(255, 255, 255); g.fillRect(0, 0, getWidth(), getHeight()); g.setColor(0, 0, 0); g.drawRect(x, y, 10, 10); } public void ruuduUusAsukoht(int ux, int uy) { x = ux; y = uy; repaint(); } }