Add cut/copy/paste to the main windows menu.
[Persons_Comparator.git] / src / Main.java
... / ...
CommitLineData
1import java.util.ArrayList;
2
3public class Main {
4
5 public static void main(String[] args) {
6 //Schedule a job for the event-dispatching thread:
7 //creating and showing this application's GUI.
8 String programName = "Person Comparator";
9
10 ArrayList<Person> personArrayList = new ArrayList<>();
11 Person person1 = new Person("Alan", "USA", 180, 95, "black");
12 personArrayList.add(person1);
13 Person person2 = new Person("Brice", "France", 190, 82, "brown");
14 personArrayList.add(person2);
15 Person person3 = new Person("Alexandre", "France", 175, 73, "green");
16 personArrayList.add(person3);
17 Person person4 = new Person("Sophia", "Brasil", 155, 57, "blue");
18 personArrayList.add(person4);
19
20 Person emptyPerson = new Person();
21 emptyPerson.setPersonArrayList(personArrayList);
22 PersonView emptyPersonView = new PersonView(emptyPerson);
23
24 javax.swing.SwingUtilities.invokeLater(new Runnable() {
25 public void run() {
26 MainWindowsView mainWindows = new MainWindowsView(programName, emptyPersonView);
27 mainWindows.showGUI();
28 }
29 });
30 }
31}