public void paint(Graphics g) { g.setColor(_random.nextInt();); // _random being a Random object already created g.drawEllipse(25, 25, 25 + 10, 25, 25, 25 + 10, 0, 0); }
private class Logic extends Thread { pulic Logic() { start(); } public void run() { while (_active) { update(); invalidate(); } }