X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2FMain.java;h=f455313b42216e69173a19fec3acaf7dac5f5cbe;hb=1a2ddb852431259fab5dc522d8caf5b74bb3acd8;hp=77979dae22387c4523a9cb43dc9b50e57dfc7744;hpb=f1e9d6d2fcc7253b117278c4439b656a1e532e68;p=Persons_Comparator.git diff --git a/src/Main.java b/src/Main.java index 77979da..f455313 100644 --- a/src/Main.java +++ b/src/Main.java @@ -1,3 +1,5 @@ +import java.util.ArrayList; + public class Main { public static void main(String[] args) { @@ -5,16 +7,24 @@ public class Main { //creating and showing this application's GUI. String programName = "Person Comparator"; - Eye blackEye = new Eye("black"); - Eye greenEye = new Eye("green"); - Eye blueEye = new Eye("blue"); - Eye brownEye = new Eye("brown"); + ArrayList personArrayList = new ArrayList<>(); + Person person1 = new Person("Alan", "United States of America", 180, 95, "black"); + personArrayList.add(person1); + Person person2 = new Person("Brice", "France", 190, 82, "brown"); + personArrayList.add(person2); + Person person3 = new Person("Alexandre", "France", 175, 73, "green"); + personArrayList.add(person3); + Person person4 = new Person("Sophia", "Brasil", 155, 57, "blue"); + personArrayList.add(person4); - //Person person = new Person(); + Person emptyPerson = new Person(); + emptyPerson.setPersonArrayList(personArrayList); + PersonView emptyPersonView = new PersonView(emptyPerson); javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { - new MainWindowsView(programName).showGUI(); + MainWindowsView mainWindows = new MainWindowsView(programName, emptyPersonView); + mainWindows.showGUI(); } }); }