FileDocCategorySizeDatePackage
intersection.javaAPI DocExample952Mon Mar 24 02:01:52 GMT 1997None

intersection

public class intersection extends Frame

Fields Summary
Rectangle
r
Rectangle
r1
Constructors Summary
intersection()

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

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

        g.drawRect (r.x, r.y, r.width, r.height);
        g.drawRect (r1.x, r1.y, r1.width, r1.height);
        Rectangle r2 = r.intersection (r1);
        System.out.println (r2);
        g.fillRect (r2.x, r2.y, r2.width, r2.height);