jFrame から印刷したいのですが、printutility と印刷に必要なものをすべて使用できます。今私の問題は、jFrameを印刷するためにjFrameをプリンタに送信する方法です。
jFrameまたはその他のソリューションから印刷することは可能ですか?
jFrame から印刷したいのですが、printutility と印刷に必要なものをすべて使用できます。今私の問題は、jFrameを印刷するためにjFrameをプリンタに送信する方法です。
jFrameまたはその他のソリューションから印刷することは可能ですか?
便利なリンク..
1.JFrame +そのコンテンツの印刷2.jFrameの印刷
3.高度な印刷4.Swingコンポーネントの印刷
You should take an image of the JFrame by painting the component to an image, and then send the image to a printer using the java.awt.print API.
public static BufferedImage takeScreenshot(Component comp) {
BufferedImage image = new BufferedImage(comp.getWidth(), comp.getHeight(), BufferedImage.TYPE_INT_RGB);
component.paint(image.getGraphics());
return image;
}