Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jdbcodbc print option

 
jagruti patil
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I m working on a project of inventory control system
I have made my frontend in java & backend in oracle.
I have given a print option.So I want to get a printout of the data which has been entered in the database.
I have done the coding for the print in the below given code.
PrinterJob pjob = PrinterJob.getPrinterJob();
PageFormat pf = pjob.defaultPage();
pjob.setPrintable(new PrintableClass(), pf);
try {
if (pjob.printDialog()) {
pjob.print();
}
} catch (PrinterException e) {
}
PrinterJob pjob = PrinterJob.getPrinterJob();
PageFormat pf = pjob.defaultPage();
try {
if (pjob.printDialog()) {
pjob.print();
}
} catch (PrinterException e) {
}
I hope your help would make my things easier
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This forum is intended for questions and comments about this web site, www.javaranch.com. It is not for questions about the Java language - that's what all the other forums are for. I'm moving this to the JDBC forum.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!