import java.awt.*; // connect to the graphics library public class GraphicsTest { public static void main(String[] args) { String command; // "l" = line, "o" = oval, "t" = text, "q" = quit Window w = new Window(300, 10); // open a drawing window 300x300 and 10 pixels from // left side of screen Graphics g = w.getGraphics(); // and get its graphics environment // System.out.println("Enter l, o, t, or q:"); // command = Keyboard.readString(); // while (!command.equals("q")) { // if (command.equals("l")) g.drawLine(0,0,100,100); // if (command.equals("o")) g.drawOval(100,100,200,200); // if (command.equals("t")) g.drawString("text in graphics window", 0, 295); // System.out.println("Enter l, o, t, or q:"); command = Keyboard.readString(); // } } }