import java.applet.*;
import java.awt.*;
import java.net.*;


public class cube extends Applet {

    public void paint( Graphics g ) {

	setBackground( Color.white );

	g.setColor( Color.red );


	// back-end top
	g.drawLine( 100, 100, 300, 100 );

	// back-end bottom
	g.drawLine( 100, 300, 300, 300 );

	// back-end left
	g.drawLine( 100, 100, 100, 300 );

	// back-end right
	g.drawLine( 300, 100, 300, 300 );

	int i = 100; // length.. kind of.

	// front-end top
	g.drawLine( 100+i, 100+i, 300+i, 100+i );

	// from back-end top to front-end top
	g.drawLine( 100, 100, 100+i, 100+i );
	g.drawLine( 300, 100, 300+i, 100+i );

	// front-end bottom
	g.drawLine( 100+i, 300+i, 300+i, 300+i );

	// from back-end bottom to front-end bottom 
	g.drawLine( 100, 300, 100+i, 300+i );
	g.drawLine( 300, 300, 300+i, 300+i );

	// front-end left
	g.drawLine( 100+i, 100+i, 100+i, 300+i );

	// front-end right
	g.drawLine( 300+i, 100+i, 300+i, 300+i );

    }   // end paint


}   // end cube
