0

So I want to print the values of my JLabel, JTextField, and JTable within the JPanel and not the JPanel itself.

What I always search always result in printing the whole Panel which includes buttons that is unnecessary: image

I did find something quite useful that prints just the JTable. it outputs the following image: image

Here is my current code which just outputs the JTable:

try {
    jTable3.print(JTable.PrintMode.NORMAL);
}
catch (java.awt.print.PrinterException e)
{
    JOptionPane.showMessageDialog(null, e);
}

My question is how can I print the values of my JLabel, JTextField and JTable within the JPanel? I'm also open to other suggestions.

Thank you very much

ricky3350
  • 1,710
  • 3
  • 20
  • 35
Eamyr
  • 11
  • 4
  • To clarify: you're trying to print something like [this](https://cdn.vertex42.com/ExcelTemplates/Images/purchase-order-template.png) (maybe without the shipping information)? – ricky3350 Sep 13 '18 at 16:51
  • Also, the code you used to generate the first image would also be appreciated. – ricky3350 Sep 13 '18 at 16:51

0 Answers0