public void createbg()
	{
		bg=createImage(600,400);
		Graphics g=bg.getGraphics();
		if(lsq!=-1)
		{
			g.setColor(new Color(0,255,0));
			g.fillRect(0,0,600,400);
			Color s[]={new Color(255,255,255),new Color(0,0,0)};
			g.setColor(s[1]);
			g.fillRect(60,60,316,316);
			for(int r=7;r>=0;r--)
			{
				for(int f=0;f<8;f++)
				{
					g.setColor(s[((r&1)+(f&1))&1]);
					g.fillRect(f*35+78,(7-r)*35+78,35,35);
					if(r==0)
					{
						g.setColor(s[0]);
						g.drawString(new String(""+(char)(f+'a')),f*35+93,370);
					}
				}
				g.setColor(s[0]);
				g.drawString(new String(""+(char)(r+'1')),65,(7-r)*35+96);
			}
			for(int r=7;r>=0;r--)
			{
				for(int f=0;f<8;f++)
				{
					if(b.c[(r<<4)+f]!=0&&(r<<4)+f!=lsq)
						if(!g.drawImage(p[b.c[(r<<4)+f]-1][b.p[(r<<4)+f]-1],f*35+78,(7-r)*35+78,this))
							System.out.println("S");
				}
			}
		}
	}