import java.awt.*;
import java.io.*;
class SimpleBean extends Canvas implements Serializable
{
		private Color color=Color.green;
		private boolean orientation=true;
		private int inc=10,oldvalue=5;
		public Color getColor()
		{ return color; }
		public void setColor(Color newColor)
		{
			inc+=5;
			color=newColor;
			repaint();
		}
		public boolean isOrientation()
		{ return orientation; }
		public void setOrientation(boolean newOri)
		{ orientation=newOri; }
		public void paint(Graphics g)
		{
			String s=" "+orientation;
			g.drawString(s,10,10);
			g.setColor(color);
			if(orientation==true)
			{
				g.fillRect(20,20,inc,70);
			}
			else
			{
				g.fillRect(20,10,70,inc);
			}
		}
		SimpleBean()
		{
			setSize(100,100);
			setBackground(Color.red);
		}
}
