Ok, habe mein zweites Fenster jetzt ausgelagert in die Klasse "EditData" und dort jeweils 5 JPanels eingefügt. Ich wollte jetzt mal versuchen eine der Tabellen zu füllen und hab es natürlich erst mal verkackt 
Ich bekomme eine NullPointer als Meldung. Hmm was habe ich falsch gemacht? Ich finde das echt mega schwer, diese ganze Verschachtelung ...
stimmt wenigstens der Ansatz/Idee in etwa? 
Oder brauch ich dafür ein Renderer?
[CODE=java] public EditData() {
initComponents();
setLocationRelativeTo(null);
setResizable(false);
try {
br.findAll(Location.DOMESTIC);
} catch (SQLException ex) {
ex.printStackTrace();
JOptionPane.showMessageDialog(null, ex);
}
bvd.show();
}
BranchRepository br;
BranchViewDomestic bvd;
//...[/CODE]
[CODE=java]
public class BranchViewDomestic {
private final BranchModel branches;
private Branch current;
private PanelBranchesDomestic panel;
public BranchViewDomestic(BranchModel branches) {
this.branches = branches;
}
public void show() {
branches.show();
panel.jTableFilialen_Deutschland.setModel(branches);
}
//...[/CODE]
[CODE=java]
public class BranchModel extends AbstractTableModel implements TableModel, ListModel<Branch>, ComboBoxModel<Branch>{
private BranchRepository branches;
private Branch.Location location;
private List<Branch> data;
private Object selected;
public BranchModel(BranchRepository branches, Branch.Location location) {
this.branches = branches;
this.location = location;
try {
data = branches.findAll(location);
} catch (SQLException e) {
data = new ArrayList<>();
e.printStackTrace();
}
}
public BranchModel show() {
BranchModel bm = new BranchModel(branches, location);
return bm;
}
//...[/CODE][CODE=java]
public class BranchRepository {
//...
private final Connection conn;
public BranchRepository() {
this.conn = null;
}
public BranchRepository(Connection conn) {
this.conn = conn;
}
//...
public List<Branch> findAll(Location where) throws SQLException {
String sql = LOCATION.get(where);
try(PreparedStatement pst = conn.prepareStatement(sql)) {
try(ResultSet rs = pst.executeQuery()){
List<Branch> result = new ArrayList<>();
while(rs.next()) {
result.add(readBranch(rs));
}
return result;
}
}
}
//... [/CODE]