Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I print a JTable?

jtable print
0
Posted

How do I print a JTable?

0

Location: http://www.jguru.com/faq/view.jsp?EID=1251266 Created: Jun 30, 2005 Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7) JDK 5.0 provides built in support for printing tables. Just call the print() method of JTable. Here’s an example of such. import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.awt.print.*; import java.text.*; public class TablePrint { public static void main(String args[]) { final Object rows[][] = { {“one”, “ichi – \u4E00”}, {“two”, “ni – \u4E8C”}, {“three”, “san – \u4E09”}, {“four”, “shi – \u56DB”}, {“five”, “go – \u4E94”}, {“six”, “roku – \u516D”}, {“seven”, “shichi – \u4E03”}, {“eight”, “hachi – \u516B”}, {“nine”, “kyu – \u4E5D”}, {“ten”, “ju – \u5341”}, {“one”, “ichi – \u4E00”}, {“two”, “ni – \u4E8C”}, {“three”, “san – \u4E09”}, {“four”, “shi – \u56DB”}, {“five”, “go – \u4E94”}, {“six”, “roku – \u516D”}, {“seven”, “shichi – \u4E03”}, {“eight”, “hachi – \u516B”}, {“nine”, “kyu – \u4E5D”}, {“ten”, “ju – \u5341”}, {“

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123