From my webpage i am calling applet that having some credential information and try to print the applet content. But i need to invisible the applet information. The paper coming as a blank if suppose the i am trying to invisible editorpane or Jframe.
//Print function
Graphics2D g2d = (Graphics2D) g;
g2d.translate(pageFormat.getImageableX(), pageFormat
.getImageableY());
disableDoubleBuffering(componentToBePrinted);
componentToBePrinted.paint(g2d);
enableDoubleBuffering(componentToBePrinted);
return (PAGE_EXISTS);
// applet
jbInit();
this.accessParamEditorPane.setEditable(false);
Font f = new Font("Arial", 1, 9);
this.accessParamEditorPane.setFont(f);
this.accessParamEditorPane.setText(Body);
//this.setVisible(false);
//accessParamEditorPane.setVisible(false);
new PrintModule(this);
dispose();
setFocusableWindowState(false);
paint, useprintorprintAll...You won't need to disable double buffering, as this is what these methods do, also, you may need to ensure that the component being printed actually has been size properly