setLayout(new BorderLayout(10, 20));
//Panel for Report Contents
Panel textPanel = new Panel(new BorderLayout());
TextArea reportTextArea = new TextArea();
String contents = "";
try {
contents = loadData();
} catch (DataAccessException ex) {
Logger.getLogger(ViewReportPanel.class.getName()).log(Level.SEVERE, null, ex);
}
reportTextArea.setEditable(false);
reportTextArea.setText(contents);
textPanel.add(reportTextArea, BorderLayout.CENTER);
add(textPanel, BorderLayout.CENTER);
//debugging purpose
Logger.getLogger(ViewReportPanel.class.getName()).log(Level.INFO, reportTextArea.getText());
//Button Print
Panel southPanel = new Panel(new FlowLayout(FlowLayout.CENTER));
Button btnPrint = new Button(" Print Report ");
btnPrint.addActionListener(new ActionListener() {