怎么通过java连接打印机打印excel表格
我写了一个应用程序,我用poi生成了excel表格, 想问下怎么通过java连接打印机打印excel表格...网上的方法太杂,有人说用ireport和jasperReport可以实现,不过没有例子,时间又紧..... 希望大家给点例子... 如果不能用java直接打印excel的话那能用什么方式代替...最后还是先谢谢大家, 最好贴代码例子,可以的话直接贴出来,方便其他人学习
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package javaapplication2; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.font.FontRenderContext; import java.awt.font.TextLayout; import java.awt.geom.AffineTransform; import java.awt.geom.GeneralPath; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.awt.print.PageFormat; import java.awt.print.Printable; import java.awt.print.PrinterException; import java.awt.print.PrinterJob; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; /** * * @author Stephen */public class PrintTest { public static void main(String[] args) { JFrame frame = new PrintTestFrame(); frame.show(); } } class PrintTestFrame extends JFrame implements ActionListener { public PrintTestFrame() { setTitle( "PrintTest ");&n
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>