<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">// changed for JDK 11/2/99, DIS

/*
  Sample graphics application.  System.in window, Text, and Format class are also
  available.  Add appropriate code to use them if desired.  hp  7/97, 8/97, 1/98	
*/

import java.io.*;
import java.awt.*;

// Class CUCSDrawing: a simple graphics window.

class CUCSDrawing extends Frame
{
    // Method paint is called by the system whenever the drawing window needs
    // to be refreshed, including when it is first created and when it is brought
    // to the front after being hidden by overlapping windows.
    // This example draws a black circle and square with red titles.
    public void paint(Graphics g)
    {
	g.setColor(Color.black);
	g.drawOval(15,30,30,30);
	g.drawRect(77,30,40,30);
	g.setColor(Color.red);
	g.drawString("circle",15,80);
	g.drawString("rectangle",75,80);
    }
    
}


// Main program for simple Graphics Applications.  The program creates the 
// drawing window and sets its size and title.  The actual drawing is done 
// by the paint method in class Drawing.  The drawing window is moved down
// the screen slightly so it won't overlap the System.in window if used.

public class CUCSGraphicsApplication
{
    public static void main(String args[])
    {
	CUCSDrawing d = new CUCSDrawing();
	d.resize(200,150);
	d.move(0,75);
	d.setTitle("Drawing");
	d.show();
	d.toFront();
    }
}

</pre></body></html>