FileDocCategorySizeDatePackage
union.javaAPI DocExample981Mon Mar 24 02:01:58 GMT 1997None

union

public class union extends Frame

Fields Summary
Rectangle
r
Rectangle
r1
Constructors Summary
union()

      
        super ("Union");
        resize (250, 250);
    
Methods Summary
public static voidmain(java.lang.String[] args)

        Frame f = new union ();
        f.show();
    
public voidpaint(java.awt.Graphics g)

            g.setColor (Color.lightGray);
            Rectangle r2 = r.union (r1);
            g.fillRect (r2.x, r2.y, r2.width, r2.height);
            g.setColor (Color.black);
            g.drawRect (r.x, r.y, r.width, r.height);
            g.drawRect (r1.x, r1.y, r1.width, r1.height);