private void analyze(Component root){
        SingleTreeModel treeModel = new SingleTreeModel(root);
        treeModels.add(treeModel);
        if (treeModels.size() == 1){
            oldComboBox.setSelectedIndex(0);
        }else if (treeModels.size() == 2){
            oldComboBox.setSelectedIndex(-1);
            oldComboBox.setEnabled(true);
            compareCheckBox.setEnabled(true);
            compareCheckBox.setSelected(true);
            lastTwoCheckBox.setSelected(true);
        }
        if (lastTwoCheckBox.isEnabled() && lastTwoCheckBox.isSelected()){
            oldComboBox.setSelectedIndex(treeModels.size() - 2);
            newComboBox.setSelectedIndex(treeModels.size() - 1);
        }
        mainFrame.setTitle(treeModel.getRoot().toString() + " " + root.getName());
        comparatorPanel.repaint();
    }