import javax.swing.*;
import java.awt.*;
public class J3DRectanglesJavaExample extends JFrame
{
public void paint(Graphics gp)
{
super.paint(gp);
final int WIDTH = 70, HEIGHT = 90;
gp.setColor(Color.RED);
gp.fill3DRect(30, 50,60,70, true);
gp.fill3DRect(100, 50,60, 70, false);
}
public static void main(String[] as)
{
J3DRectanglesJavaExample frm = new J3DRectanglesJavaExample();
frm.setSize(190, 170);
frm.setVisible(true);
}
}