How do you reference an object that is private in a different class? There is this method you see below and I need to reference it in another class. I had tried doing: createCustomerDisplay = new JScrollPane; in the new class but that didn't work and doesn't make sense when I look at again since it won't contain everything it needs to.
Code:private JScrollPane createCustomerDisplay() {
customerDB = new JTable(new CustomerTableModel(customers));
customerDB.doLayout();
customerDB.setShowGrid(true);
// make it so only rows can be selected.
customerDB.setRowSelectionAllowed(true);
customerDB.setColumnSelectionAllowed(false);
JScrollPane scrollpane = new JScrollPane(customerDB);
customerDB.setFillsViewportHeight(true);
return scrollpane;
}

