/* * File: MoreRect.java * * Drawing simple shapes * * Copyright: Northeast Parallel Architectures Center */ import java.awt.Color; import java.awt.Graphics; public class MoreRect extends java.applet.Applet { Color purple = new Color (127, 0, 255); Color turquoise = new Color (0, 127, 255); public void paint(Graphics g) { setBackground(Color.white); g.setColor(purple); // drawRoundRect (x, y, width, height, arcwidth, archeight) g.fillRoundRect (20, 20, 40, 60, 10, 10); g.setColor (turquoise); // draw3DRect (x, y, width, height, raised) g.fill3DRect (120, 20, 40, 60, true); g.drawString("Rounded and 3D Rectangles", 20, 100); } }