M
Manoj Nair
I have a applet within a JSP. On click of a button on the screen the
javascript calls a method in the applet. This method inside applet
accesses the PrinterJob function. But during runtime I get a
java.awt.print.PrinterJob class not found. Here is code..
JSP file has applet tag.
<APPLET CODE="PrintApplet.class" NAME="PrintApplet" WIDTH=100
HEIGHT=100>
</APPLET>
function callApplet()
{
document.applets["PrintApplet"].callPrintFunction();
}
Inside the applet I have the callPrintFunction() as follows
PrintJob printJob = java.awt.print.PrinterJob.getPrinterJob();
if (printJob == null) return;
printJob.setCopies(1);
if (printJob.printDialog()) {
}
Please help..Thx
javascript calls a method in the applet. This method inside applet
accesses the PrinterJob function. But during runtime I get a
java.awt.print.PrinterJob class not found. Here is code..
JSP file has applet tag.
<APPLET CODE="PrintApplet.class" NAME="PrintApplet" WIDTH=100
HEIGHT=100>
</APPLET>
function callApplet()
{
document.applets["PrintApplet"].callPrintFunction();
}
Inside the applet I have the callPrintFunction() as follows
PrintJob printJob = java.awt.print.PrinterJob.getPrinterJob();
if (printJob == null) return;
printJob.setCopies(1);
if (printJob.printDialog()) {
}
Please help..Thx