public static void rect( double x, double y, double w, double h )
	{
		if ( filling )
		{
			pane.setColor( fillColor );
			if ( rectMode == 0 )
				pane.fillRect( (int) x, (int) y, (int) w, (int) h );
			else if ( rectMode == 1 )
				pane.fillRect( (int) ( x - w / 2 ), (int) ( y - h / 2 ), (int) w, (int) h );
		}
		if ( stroking )
		{
			Graphics2D g2d = (Graphics2D) pane;
			g2d.setStroke( new BasicStroke( (float) strokeWeight ) );
			pane.setColor( strokeColor );
			if ( rectMode == 0 )
				pane.drawRect( (int) x, (int) y, (int) w, (int) h );
			else if ( rectMode == 1 )
				pane.drawRect( (int) ( x - w / 2 ), (int) ( y - h / 2 ), (int) w, (int) h );	
		}
	}