Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

print jtable in 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());
        }
}
Source by mauricemuteti.info #
 
PREVIOUS NEXT
Tagged: #print #jtable #java
ADD COMMENT
Topic
Name
5+8 =