Imprimer JTable en Java
JTable jtable;//your JTable. Initialize before printing.
jtable.print();//prompts built-in printing process.
//with exception catching:
public void printJavaJFrameJTable() {
try {
boolean print = jTable1.print();
if (!print) {
JOptionPane.showMessageDialog(null, "Unable To Print !!..");
}
} catch (PrinterException ex) {
JOptionPane.showMessageDialog(null, ex.getMessage());
}
}
Ten Horizons