调用了printAll方法,其他组件都出来了,就是Barcode条码不出来。为什么呐?谢谢大家了。。急。。
Image img =barcode.createImage(40, 15);
ImageIcon ii=new ImageIcon(img);
JLabel label = new JLabel(ii);
但是createImage(40,15)返回的是null。请问是为什么呢?
Image img =barcode.createImage(40, 15);
ImageIcon ii=new ImageIcon(img);
JLabel label = new JLabel(ii);
但是createImage(40,15)返回的是null。请问是为什么呢?
已经用其他方法解决了。不过还是谢了。
OutputStream outputStream=new FileOutputStream(barcodeImagePath);
BarcodeImageHandler.writePNG(barcode, outputStream);
我先将要生成的条形码保存到1png图片中,打印这张图片。最后再删掉。