Your browser does not support the HTML canvas tag.
Color



Home

//******************************************************************************
// project4.for.java:	Applet
//
//******************************************************************************
import java.applet.*;
import java.awt.*;
public class project4 extends Applet
{
	//String     sText; 
	Button     btnRed,
		   btnGreen,
		   btnBlue;
	Label      lblPrompt;
	TextField  txtData;

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

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

public void init()
{
	resize( 300, 45 );
	
	//sText     = "That's All Folks";
	
	btnRed    = new Button("Red");
	btnGreen  = new Button("Green");
	btnBlue   = new Button("Blue");
	
	lblPrompt = new Label("Color");
	
	txtData   = new TextField ("Default Gray");
	
	add(btnRed);
	add(btnGreen);
	add(btnBlue);
	add(lblPrompt);
	add(txtData);
		

// TODO: Place additional initialization code here
}

public void paint(Graphics g)
{
	//g.drawString (sText, 100, 75);
}

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

public void stop()
{
}

}