Your browser does not support the HTML canvas tag.



Home

//******************************************************************************
// gramin01.for.java:	Applet
//
//******************************************************************************
import java.applet.*;
import java.awt.*;
public class gramin01 extends Applet
{
	int icount;

public gramin01()
{
// TODO: Add constructor code here
}

public String getAppletInfo()
{
	return "Name: gramin01\r\n" +
	       "Author: \r\n" +
	       "Created with Microsoft Visual J++ Version 6.0";
}

public void init()
{
	resize( 255, 255 );
	
	icount = 0;
		

// TODO: Place additional initialization code here
}

public void paint(Graphics g)
{
	for ( int iY = 0 ; iY < 255 ; iY++ )
	{ for ( int iX = 0 ; iX <255 ; iX++ )
	  {
		//g.setColor ( new Color ( (iX+iY)%255, (iX/2)%255, (iX*iY)%255 ) );
		g.setColor ( new Color ( iY, iX, icount ) );
		g.drawLine ( iX, iY, iX, iY );
		icount = icount+1;
	  }
	}	
			
	/*g.setColor ( new Color ( 255, 0, 0) );
	g.fillRect ( 10, 10, 30, 30 );
	
	g.setColor ( new Color ( 0, 255, 0) );
	g.fillOval ( 100, 100, 30, 30 );

	g.setColor ( new Color ( 0, 0, 255) );
	g.drawLine ( 50, 50, 250, 250 );

	g.setColor ( new Color ( 255, 50, 90) );
	g.drawRoundRect ( 80, 80, 100, 50, 20, 20 ); */
}

public void start()
{
// TODO: Place additional applet start code here
}

public void stop()
{
}

}