private JPanel createDiffInfoPanel() {
    final JPanel panel = new JPanel(new GridLayout(1, 2, 2, 2));

    final JPanel primaryPanel = new JPanel(new BorderLayout());
    final JPanel secondaryPanel = new JPanel(new BorderLayout());

    final JPanel primary = new JPanel(new GridLayout(5, 1, 2, 2));
    final JPanel secondary = new JPanel(new GridLayout(5, 1, 2, 2));
    primaryPanel.setBorder(new TitledBorder("Primary Image"));
    secondaryPanel.setBorder(new TitledBorder("Secondary Image"));
    primary.setBorder(new LineBorder(Color.GRAY));
    secondary.setBorder(new LineBorder(Color.GRAY));
    primary.setBackground(Color.WHITE);
    secondary.setBackground(Color.WHITE);

    primary.add(
        GuiUtils.createHorizontalNamedLabelPanel(
            "IDB Name", TEXTFIELD_LABEL_WIDTH, primaryIDBName, TEXTFIELD_HEIGHT));
    primary.add(
        GuiUtils.createHorizontalNamedLabelPanel(
            "Image Name", TEXTFIELD_LABEL_WIDTH, primaryImageName, TEXTFIELD_HEIGHT));
    primary.add(
        GuiUtils.createHorizontalNamedLabelPanel(
            "Hash", TEXTFIELD_LABEL_WIDTH, primaryImageHash, TEXTFIELD_HEIGHT));
    primary.add(
        GuiUtils.createHorizontalNamedLabelPanel(
            "Architecture", TEXTFIELD_LABEL_WIDTH, primaryArchitectureName, TEXTFIELD_HEIGHT));
    primary.add(
        GuiUtils.createHorizontalNamedLabelPanel(
            "Functions", TEXTFIELD_LABEL_WIDTH, primaryFunctions, TEXTFIELD_HEIGHT));

    secondary.add(
        GuiUtils.createHorizontalNamedLabelPanel(
            "IDB Name", TEXTFIELD_LABEL_WIDTH, secondaryIDBName, TEXTFIELD_HEIGHT));
    secondary.add(
        GuiUtils.createHorizontalNamedLabelPanel(
            "Image Name", TEXTFIELD_LABEL_WIDTH, secondaryImageName, TEXTFIELD_HEIGHT));
    secondary.add(
        GuiUtils.createHorizontalNamedLabelPanel(
            "Hash", TEXTFIELD_LABEL_WIDTH, secondaryImageHash, TEXTFIELD_HEIGHT));
    secondary.add(
        GuiUtils.createHorizontalNamedLabelPanel(
            "Architecture", TEXTFIELD_LABEL_WIDTH, secondaryArchitectureName, TEXTFIELD_HEIGHT));
    secondary.add(
        GuiUtils.createHorizontalNamedLabelPanel(
            "Functions", TEXTFIELD_LABEL_WIDTH, secondaryFunctions, TEXTFIELD_HEIGHT));

    primaryPanel.add(primary, BorderLayout.CENTER);
    secondaryPanel.add(secondary, BorderLayout.CENTER);

    panel.add(primaryPanel);
    panel.add(secondaryPanel);

    return panel;
  }
Panel containing the contextual view when a diff is selected in the tree view.
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/tabpanels/projecttabpanel/treenodepanels/DiffTreeNodeContextPanel.java