Quebrar Pagina

0 respostas
D

Este metodo foi pego aki no PJ mesmo, e server para impressão
Alguem sabe como quebrar página?

public int print(Graphics g, PageFormat pf, int pageIndex){ 
       
      try{ 
          
         g.setFont(new Font("Arial",Font.BOLD, 18)); 
         g.drawString(cabecalho, 60, 75); 
          
         g.setFont(new Font("Courier",Font.PLAIN, 10)); 
          
        for(int i=1;i<=10;i++)     
           g.drawString( "Teste" , 20, (i*100) ); 
          
         g.setFont(new Font("Arial",Font.PLAIN, 10)); 
         g.drawString( rodape, 79,  660 ); 
      } 
      catch( Exception e ){ 
       
         e.printStackTrace(); 
         JOptionPane.showMessageDialog(null, "Exception3: " + e.toString()); 
      } 
       
      return Printable.PAGE_EXISTS; 
   }
Criado 29 de março de 2005
Respostas 0
Participantes 1