import java.awt.*; public class DrawLineTest extends Frame { public static void main(String[] args) { DrawLineTest frame = new DrawLineTest(); frame.setVisible(true); Image img = frame.createVolatileImage(1000, 1000); new Thread() { public void run() { try { Thread.sleep(10000); } catch(Exception e) {} System.err.println("Test failed"); Runtime.getRuntime().halt(1); } }.start(); img.getGraphics().drawLine(0, 0, 34005, 34005); System.exit(0); } }