I have a class (a Frame) within which there are many other classes (classes that extend JPanel). The relationship between the Frame and its constituent panels is evidently an aggregation. Now, there are plenty of variables that the Frame and its panels need to access (say, var1,var2 and var3). The panels have to access these variables upon repaint. The Frame has to access the same set of variables for other purposes (like when it needs to output a report that has the values of the variables).
Where should I put these variables ? Should I include them in the declaration part of the Frame as private variables? Should I create a new class and have the variales be instance variables of that class, and what would be the relationship between this very class and the other classes (i.e. the Frame and it's constituents panels) ?