How to use export Pdf file through Swing?
in
Integration and Hardware
•
8 months ago
Hello,
İ want to save pdf file when I click button through Swing
i have a class that name is "createHexMirrorPdf extends PApplet.. as follows..
- //......///
- public class createHexMirrorPdf extends PApplet{
- public createHexMirrorPdf(float discap,float kucukborucap,float ucgenkenar,float aynakalinlik,int mode,int miktar,String dosya){
- pdiscap=discap;
- pkucukborucap=kucukborucap;
- pucgenkenar=ucgenkenar;
- paynakalinlik=aynakalinlik;
- pmode=mode;
- this.miktar=miktar;
- pDosya=dosya;
- }
- public void setup() {
- draw(pdiscap,pkucukborucap,pucgenkenar,paynakalinlik,pmode,miktar,pDosya);
- }
- public void draw(float discap,float kucukborucap,float ucgenkenar,float aynakalinlik,int mode,int miktar,String fileName) {
- size(1192, 842,PDF,fileName);
- background(255);
- // Draw something good here
- //..............//
- println("Finished.");
- }
- }
so it works for create a pdf file through Processing Compiler but i call this class from other JFrame Class.
- private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {
- createHexMirrorPdf hexMirrorPdf=new createHexMirrorPdf(161, 18, 22, 3, 2, 2,fileExtension);
- hexMirrorPdf.init();
- }
I click Jlabel1 but it did not work...How can i do it?
i am waiting your solutions..
1