public AIMerger() {
    super("App Inventor Merger v1.1");

    // Set the size and location of the application's window based on the screen size.
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    setSize((int) (screenSize.width * WIDTH_PERCENT_OF_SCREEN),
        (int) (screenSize.height * HEIGHT_PERCENT_OF_SCREEN));
    setLocation((int) ((screenSize.width - screenSize.width * WIDTH_PERCENT_OF_SCREEN) / 2),
        (int) ((screenSize.height - screenSize.height * HEIGHT_PERCENT_OF_SCREEN) / 2));

    // Create a reference to the content pane of the JFrame.
    myCP = this.getContentPane();
    myCP.setLayout(null);
    myCP.setBackground(ANDROID_GREEN);

    // Main project title and instructions.
    instructMainProjectL = new JLabel("Browse for and load your Main Project.");
    instructMainProjectL.setFont(HEADER_TWO_FONT);
    instructMainProjectL.setSize(1000, 24);
    instructMainProjectL.setLocation(20, 20);
    myCP.add(instructMainProjectL);

    // Main project note.
    instructMainProjectNotesL = new JLabel("The main project's Screen1 will be the "
        + "merged project's Screen1");
    instructMainProjectNotesL.setFont(HEADER_THREE_FONT);
    instructMainProjectNotesL.setSize(1000, 20);
    instructMainProjectNotesL.setLocation(20, instructMainProjectL.getLocation().y + 20);
    myCP.add(instructMainProjectNotesL);

    // Text field to enter path to main project.
    mainProjectTF = new JTextField(300);
    mainProjectTF.setBackground(Color.WHITE);
    mainProjectTF.setEditable(true);
    mainProjectTF.setSize(300, 30);
    mainProjectTF.setLocation(20, instructMainProjectNotesL.getLocation().y + 20);
    myCP.add(mainProjectTF);

    // Browse button for main project.
    mainProjectBrowseB = new JButton("Browse");
    mainProjectBrowseB.setSize(100, 30);
    mainProjectBrowseB.setLocation(mainProjectTF.getLocation().x + mainProjectTF.getSize().width
        + 10, mainProjectTF.getLocation().y);
    mainProjectBrowseB.addActionListener(new MainProjectBrowseBActionListener());
    myCP.add(mainProjectBrowseB);

    // Load button for main project
    mainProjectLoadB = new JButton("Load");
    mainProjectLoadB.setSize(100, 30);
    mainProjectLoadB.setLocation(mainProjectBrowseB.getLocation().x
        + mainProjectBrowseB.getSize().width + 10, mainProjectTF.getLocation().y);
    mainProjectLoadB.addActionListener(new MainProjectLoadBActionListener());
    myCP.add(mainProjectLoadB);

    // Second project title.
    instructSecondProjectL = new JLabel("Browse for and load your Second Project.");
    instructSecondProjectL.setFont(HEADER_TWO_FONT);
    instructSecondProjectL.setSize(1000, 24);
    instructSecondProjectL.setLocation(20, mainProjectTF.getLocation().y
        + mainProjectTF.getSize().height + 20);
    myCP.add(instructSecondProjectL);

    // Text field to enter the second project's path.
    secondProjectTF = new JTextField(300);
    secondProjectTF.setBackground(Color.WHITE);
    secondProjectTF.setEditable(true);
    secondProjectTF.setSize(300, 30);
    secondProjectTF.setLocation(20, instructSecondProjectL.getLocation().y + 25);
    myCP.add(secondProjectTF);

    // Browse button for the second project
    secondProjectBrowseB = new JButton("Browse");
    secondProjectBrowseB.setSize(100, 30);
    secondProjectBrowseB.setLocation(secondProjectTF.getLocation().x
        + secondProjectTF.getSize().width + 10, secondProjectTF.getLocation().y);
    secondProjectBrowseB.addActionListener(new SecondProjectBrowseBActionListener());
    myCP.add(secondProjectBrowseB);

    // Load button for the second project.
    secondProjectLoadB = new JButton("Load");
    secondProjectLoadB.setSize(100, 30);
    secondProjectLoadB.setLocation(
        secondProjectBrowseB.getLocation().x + secondProjectBrowseB.getSize().width + 10,
        secondProjectTF.getLocation().y);
    secondProjectLoadB.addActionListener(new SecondProjectLoadBActionListener());
    myCP.add(secondProjectLoadB);

    // AI Merger icon
    JLabel picLabel = new JLabel(new ImageIcon(getClass().getResource("img/logoclear.png")));
    picLabel.setSize(400, 145);
    picLabel.setLocation(575, 20);
    myCP.add(picLabel);

    // Location and size of the panel that displays the projects.
    projectDisplayPanelLocation = new Point(20, secondProjectTF.getLocation().y + BORDER_THICKNESS);
    projectDisplayPanelSize = new Dimension((int) (screenSize.width * WIDTH_PERCENT_OF_SCREEN) - 
        BORDER_THICKNESS, (int) (screenSize.height * HEIGHT_PERCENT_OF_SCREEN) - 
        projectDisplayPanelLocation.y - BORDER_THICKNESS);

    // Panel that holds the components of the main project.
    mainProjectDisplayP = new JPanel();
    mainProjectDisplayP.setVisible(false);
    mainProjectDisplayP.setSize(projectDisplayPanelSize.width / 3, projectDisplayPanelSize.height);
    mainProjectDisplayP.setLocation(20, projectDisplayPanelLocation.y);
    mainProjectDisplayP.setLayout(new BoxLayout(mainProjectDisplayP, BoxLayout.Y_AXIS));
    mainProjectDisplayP.setBorder(new EmptyBorder(5, 20, 20, 20));
    myCP.add(mainProjectDisplayP);

    // Main project's name.
    mainProjectTitleL = new JLabel();
    mainProjectTitleL.setFont(HEADER_TWO_FONT);
    mainProjectDisplayP.add(mainProjectTitleL);

    mainProjectDisplayP.add(Box.createRigidArea(new Dimension(0, 10)));

    // Label for the list of screens for the main project
    mainProjectScreensL = new JLabel("Screens");
    mainProjectScreensL.setFont(HEADER_TWO_FONT);
    mainProjectDisplayP.add(mainProjectScreensL);

    // Instructions for the list of screens for the main project.
    mainProjectScreensInstrucL = new JLabel("Check screens to merge into new project");
    mainProjectScreensInstrucL.setFont(HEADER_THREE_FONT);
    mainProjectDisplayP.add(mainProjectScreensInstrucL);

    // List of checkboxes for the screens from the main project
    mainProjectScreensCBL = new CheckBoxList();
    mainProjectScreensP = new JScrollPane();
    mainProjectDisplayP.add(mainProjectScreensP);

    mainProjectDisplayP.add(Box.createRigidArea(new Dimension(0, 10)));

    // Label for the list of assets for the main project
    mainProjectAssetsL = new JLabel("Assets");
    mainProjectAssetsL.setFont(HEADER_TWO_FONT);
    mainProjectDisplayP.add(mainProjectAssetsL);

    // Instructions for the list of assets for the main project.
    mainProjectAssetsInstrucL = new JLabel("Check assets to merge into new project");
    mainProjectAssetsInstrucL.setFont(HEADER_THREE_FONT);
    mainProjectDisplayP.add(mainProjectAssetsInstrucL);

    // List of checkboxes for the assets from the main project.
    mainProjectAssetsCBL = new CheckBoxList();
    mainProjectAssetsP = new JScrollPane();
    mainProjectDisplayP.add(mainProjectAssetsP);

    // Panel that holds the merge button and arrows.
    mergeButtonP = new JPanel();
    mergeButtonP.setVisible(false);
    mergeButtonP.setSize(projectDisplayPanelSize.width / 3, projectDisplayPanelSize.height);
    mergeButtonP.setLocation(projectDisplayPanelSize.width / 3 + 20, projectDisplayPanelLocation.y);
    mergeButtonP.setBackground(ANDROID_GREEN);
    mergeButtonP.setLayout(null);
    myCP.add(mergeButtonP);

    // Merge button.
    mergeB = new JButton("Merge");
    mergeB.setSize(150, 100);
    mergeB.setLocation(mergeButtonP.getWidth() / 2 - mergeB.getWidth() / 2,
        mergeButtonP.getHeight() / 2 - mergeB.getHeight() / 2);
    mergeB.addActionListener(new MergeBActionListener());
    mergeButtonP.add(mergeB);

    // Merging arrows image.
    picLabel = new JLabel(new ImageIcon(getClass().getResource("img/arrows3.png")));
    picLabel.setSize(332, 250);
    picLabel.setLocation((mergeButtonP.getWidth() - picLabel.getWidth()) / 2,
        (mergeButtonP.getHeight() - picLabel.getHeight()) / 2);
    mergeButtonP.add(picLabel);

    // Panel that holds the components of the second project.
    secondProjectDisplayP = new JPanel();
    secondProjectDisplayP.setVisible(false);
    secondProjectDisplayP.setSize(projectDisplayPanelSize.width / 3, 
        projectDisplayPanelSize.height);
    secondProjectDisplayP.setLocation(2 * projectDisplayPanelSize.width / 3 + 20, 
        projectDisplayPanelLocation.y);
    secondProjectDisplayP.setLayout(new BoxLayout(secondProjectDisplayP, BoxLayout.Y_AXIS));
    secondProjectDisplayP.setBorder(new EmptyBorder(5, 20, 20, 20));
    myCP.add(secondProjectDisplayP);

    // Second project's name.
    secondProjectTitleL = new JLabel();
    secondProjectTitleL.setFont(HEADER_TWO_FONT);
    secondProjectDisplayP.add(secondProjectTitleL);

    secondProjectDisplayP.add(Box.createRigidArea(new Dimension(0, 10)));

    // Label for the list of screens for the second project
    secondProjectScreensL = new JLabel("Screens");
    secondProjectScreensL.setFont(HEADER_TWO_FONT);
    secondProjectDisplayP.add(secondProjectScreensL);

    // Instructions for the list of screens for the second project.
    secondProjectScreensInstrucL = new JLabel("Check Screens to Merge into New Project");
    secondProjectScreensInstrucL.setFont(HEADER_THREE_FONT);
    secondProjectDisplayP.add(secondProjectScreensInstrucL);

    // List of checkboxes for the screens from the second project.
    secondProjectScreensCBL = new CheckBoxList();
    secondProjectScreensP = new JScrollPane();
    secondProjectDisplayP.add(secondProjectScreensP);

    secondProjectDisplayP.add(Box.createRigidArea(new Dimension(0, 10)));

    // Label for the list of assets for the second project
    secondProjectAssetsL = new JLabel("Assets");
    secondProjectAssetsL.setFont(HEADER_TWO_FONT);
    secondProjectDisplayP.add(secondProjectAssetsL);

    // Instructions for the list of assets for the second project.
    secondProjectAssetsInstrucL = new JLabel("Check Assets to Merge into New Project");
    secondProjectAssetsInstrucL.setFont(HEADER_THREE_FONT);
    secondProjectDisplayP.add(secondProjectAssetsInstrucL);

    // List of checkboxes for the assets from the second project.
    secondProjectAssetsCBL = new CheckBoxList();
    secondProjectAssetsP = new JScrollPane();
    secondProjectDisplayP.add(secondProjectAssetsP);

    setVisible(true);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

  }