You are on page 1of 2

String data[] = new String[1]; // untuk baris 1 pengaturan di file Ada, jarak beda data[0]=String.

format("%-125s", " ")+String.format("%-20s", deposito.get Nobilyet().toString().substring(2))+"\n"; data[0] = data[0] + String.format("%-194s", " ")+String.format("%-20s",d eposito.getNorek()) + "\n\n" ; data[0]=data[0]+String.format("%-34S", " ") + String.format("%-50S", deposito.getNasabah().getNmcust())+"\n\n"; data[0]=data[0]+String.format("%-34S", " ") + String.format("%-70S" , deposito.getNasabah().getRalm()+", "+deposito.getNasabah().getRkota())+" "+dep osito.getNasabah().getRpos()+"\n\n"; data[0]=data[0]+String.format("%-34s", " ") + String.format("%-50s" , "Rp "+TextComponentUtils.formatNumber(String.valueOf(deposito.getNomdep().lon gValue()))+",00")+"\n\n"; data[0]=data[0]+String.format("%-33s", " ") + String.format("%-50S" , Number_Word.konversi(deposito.getNomdep().intValue()))+"\n\n"; //nominal bilan gan data[0]=data[0]+String.format("%-34s", " ") + String.format("%-30s" , deposito.getJwbln())+String.format("%-50S", Number_Word.konversi(deposito.getJ wbln()))+"\n"; //nominal JW? Date tanggala=(Date) deposito.getTglakhir(); SimpleDateFormat sdta=new SimpleDateFormat("dd-MM-yyyy"); String tgla=(String) sdta.format(tanggala); data[0]=data[0]+String.format("%-34s", " ") + String.format("%-50s" , tgla)+"\n"; if (deposito.getAro().getCdaro()=="1") { data[0]=data[0]+String.format("%-34s", " ") + String.format("%50S", "DIPERPANJANG OTOMATIS (ARO)")+"\n"; } else { data[0]=data[0]+String.format("%-34s", " ") + String.format("%50S", "TIDAK OTOMATIS (NON-ARO)")+"\n"; } data[0]=data[0]+String.format("%-34s", " ") + String.format("%-50s" , deposito.getSukubunga()+" pa")+"\n"; Date tanggal=(Date) deposito.getTglbuka(); SimpleDateFormat sdt=new SimpleDateFormat("dd MMMM yyyy"); String tgl=(String) sdt.format(tanggal); //tanggal dadepase yyyy-M M-dd // untuk bunga dibayar dan tgl tanda tangan yg sejajar (baris 1) if (deposito.getDstBunga().getCddist()=="1") { //ke R/K tabungan data[0]=data[0]+String.format("%-34s", " ") + String.format("%50S", "DIPINDAH BUKU KE REKENING TABUNGAN")+String.format("%-100s", " ")+String. format("%-50s", tgl)+"\n"; data[0]=data[0]+String.format("%-34s", " ") + String.format("%50s", "No. R/K : ")+deposito.getCdtabbunga()+"\n"; data[0]=data[0]+String.format("%-34s", " ") + String.format("%50s", "Atas Nama : ")+deposito.getNmtabbunga()+"\n\n\n"; } else { //Tunai data[0]=data[0]+String.format("%-34s", " ") + String.format("%50S", "TUNAI")+String.format("%-100s", " ")+String.format("%-50s", tgl)+"\n"; data[0]=data[0]+"\n"; data[0]=data[0]+"\n\n\n"; } data[0]=data[0]+String.format("%-184s", " ") + String.format("%-50S" , "SUGIYONO");

k iri.9.defaultPage().0.setPageable(new PageableText(implode(data). kanan. // Get the default page format. //cetak job.printStackTrace(ex). } catch (IOException ex) { Exceptions.getPrinterJob().printRecord(implode(data)). } .defaultPage()). then ask the user to customize it PageFormat format = job. Paper paper = format.setPaper(paper). atas. paper. } catch (PrinterException ex) { Exceptions.getPaper().setImageableArea(1.6. bawah format.print().//pageDialog(job. // Get the PrinterJob object that coordinates everything PrinterJob job = PrinterJob. // 1 inch=72titik. ada. and tell the PrinterJob about it job.75*72. format)). try { // Create our PageableText object.// // Ada ada=new Ada().3*72.75*72).printStackTrace(ex).3*72.