public ComponentPrintService(Component c,PageFormat format){
  setPageFormat(format);
  setPrintable(this);
  setComponent(c);
  Rectangle componentBounds=c.getBounds(null);
  setSize(componentBounds.width,componentBounds.height);
  setScale(1,1);
}

public ComponentPrintService ( Component c , PageFormat format ) { setPageFormat ( format ) ; setPrintable ( this ) ; setComponent ( c ) ; Rectangle componentBounds = c . getBounds ( null ) ; setSize ( componentBounds . width , componentBounds . height ) ; setScale ( 1 , 1 ) ; }
create a pageable that can print a swing jcomponent over multiple pages .
