在我的网页上,我正在调用具有一些凭据信息的小程序并尝试打印小程序内容。但我需要隐藏小程序信息。如果假设我试图隐藏编辑窗格或 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);