X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2FMainWindowsView.java;h=dbe2eedaf9beaee2f2f75da5c24374cbfa21121e;hb=b974e749af3a4b2df3737b2d361233c704dcc4d8;hp=bc7951152f608bfdd4f8633efc2a9b99120cc8f1;hpb=416e35f7e06f4689cccfd220bf1b4a20ffac54ec;p=Persons_Comparator.git diff --git a/src/MainWindowsView.java b/src/MainWindowsView.java index bc79511..dbe2eed 100644 --- a/src/MainWindowsView.java +++ b/src/MainWindowsView.java @@ -5,7 +5,8 @@ import java.awt.event.ActionListener; import java.util.ArrayList; public class MainWindowsView extends JFrame { - MainWindowsView(String title) { + + MainWindowsView(String title, JPanel panel) { //Create and set up the window. setTitle(title); setSize(300, 300); @@ -25,9 +26,6 @@ public class MainWindowsView extends JFrame { }); 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 components = new ArrayList<>(); for (int i = 0; i < panel.getComponentCount(); i++) { @@ -56,5 +54,4 @@ public class MainWindowsView extends JFrame { //this.pack(); this.setVisible(true); } - } \ No newline at end of file