/* * XFrame.java -- * * a box component. * * 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/XFrame.java,v 1.3 1996/01/21 09:48:09 ryw Exp $ xFS (Berkeley)" */ package ryw; import java.awt.*; /** * A rectangle. */ public class XFrame extends Canvas { boolean raised = false; public XFrame (int w, int h) { resize (new Dimension (w, h)); } public XFrame (Dimension d) { resize (d); } public XFrame (Dimension d, boolean raised) { this (d); this.raised = raised; } public void paint (Graphics g) { Dimension size = size (); g.setColor (Color.lightGray); // g.fill3DRect (0, 0, size.width, size.height, raised); g.draw3DRect (2, 2, size.width-4, size.height-4, raised); } }