public class MainWindowsView extends JFrame {
- MainWindowsView(String title) {
+ MainWindowsView(String title, JPanel panel) {
//Create and set up the window.
setTitle(title);
setSize(300, 300);
});
fileMenu.add(exit);
- //Main pane
- JPanel panel = new PersonView();
-
//Get all Swing/AWT primitive components in the views and add them to the panel.
ArrayList<Component> components = new ArrayList<>();
for (int i = 0; i < panel.getComponentCount(); i++) {