super(cs);
curX = 0; tmpChar[0] = (char) ce.character; repaint();
Dimension d = getSize(); gc.clearRect(0, 0, d.width, d.height); if (tmpChar[0] == 0) return; int charWidth = fm.charWidth(tmpChar[0]); gc.drawChars(tmpChar, 0, 1, curX++, fontHeight);
try { lock.lock(); while (true) { try { if (done) { cv.await(); } else { repaint(); cv.await(100, TimeUnit.MILLISECONDS); } } catch (InterruptedException ie) { return; } } } finally { lock.unlock(); }
try { lock.lock(); done = b; if (timer == null) { timer = new Thread(this); timer.start(); } if (!done) cv.signal(); } finally { lock.unlock(); }