/* 
 * XPanel0.java --
 *
 *      panel with some extensions.
 *
 * Copyright 1995 Regents of the University of California
 * Permission to use, copy, modify, and distribute this
 * software and its documentation for any purpose and without
 * fee is hereby granted, provided that this copyright
 * notice appears in all copies.  The University of California
 * makes no representations about the suitability of this
 * software for any purpose.  It is provided "as is" without
 * express or implied warranty.
 *
 * rcsid = "$Header: /disks/barad-dur/now/rywang/src/java/classes/ryw/XPanel0.java,v 1.2 1995/10/02 10:58:25 rywang Exp $ xFS (Berkeley)"
 */

package ryw;

import java.awt.*;


/**
 * Same as a panel, but has friendlier overloaded add() methods.
 */
public class XPanel0 extends Panel {

    public XPanel0 () {
	setLayout (new BorderLayout ());
    }

    
    public void add (Component comp, int x, int y, int w, int h) {
	add (comp);
	comp.move (x, y);
	comp.resize (w, h);
    }

    
    public void add (Component comp, int x, int y) {
	add (comp);
	comp.move (x, y);
    }


    public void add (Component comp, Point pos, Dimension size) {
	add (comp, pos.x, pos.y, size.width, size.height);
    }


    public void add (Component comp, Point pos) {
	add (comp, pos.x, pos.y);
    }
}

