import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class TestFrame extends JFrame
{
		JPanel jpanel=new JPanel();
		SimpleBean db=new SimpleBean();
		BorderLayout bord=new BorderLayout();
		TestFrame(String title)
		{
			super(title);
			enableEvents(AWTEvent.WINDOW_EVENT_MASK);
			try
			{
				jbInit();
			}
			catch(Exception e){System.out.println(e.toString());}
		}
		private void jbInit() throws Exception 
		{
			db.setColor(Color.blue);
			db.setOrientation(false);
			this.getContentPane().setLayout(bord);
			this.getContentPane().add(jpanel,BorderLayout.CENTER);
			jpanel.add(db,null);
		}
		protected void processWindowEvent(WindowEvent e)
		{
			super.processWindowEvent(e);
			if(e.getID()==WindowEvent.WINDOW_CLOSING)
			{
				System.exit(0);
			}
		}
		public static void main(String arg[])
		{
			TestFrame tt=new TestFrame("SimpleBean");
			tt.pack();
			tt.show();
		}
}
