private void init() {
    final JPanel panel = new JPanel(new BorderLayout());
    panel.setBorder(new EmptyBorder(5, 5, 5, 5));

    final JPanel setterPanel = new JPanel(new GridLayout(6, 1, 3, 3));
    setterPanel.setBorder(new TitledBorder(description));

    setterPanel.add(
        GuiUtils.createHorizontalNamedComponentPanel(
            "Destination directory:", LABEL_WIDTH, destinationChooserPanel, ROW_HEIGHT));
    setterPanel.add(
        GuiUtils.createHorizontalNamedComponentPanel(
            "Primary image name:", LABEL_WIDTH, primaryImageName, ROW_HEIGHT));
    setterPanel.add(
        GuiUtils.createHorizontalNamedComponentPanel(
            "Secondary image name:", LABEL_WIDTH, secondaryImageName, ROW_HEIGHT));
    setterPanel.add(
        GuiUtils.createHorizontalNamedComponentPanel(
            "Combined image name:", LABEL_WIDTH, combinedImageName, ROW_HEIGHT));
    setterPanel.add(
        GuiUtils.createHorizontalNamedComponentPanel(
            "Image file format:", LABEL_WIDTH, imageFormat, ROW_HEIGHT));
    setterPanel.add(
        GuiUtils.createHorizontalNamedComponentPanel(
            "Clip Area:", LABEL_WIDTH, captureRegion, ROW_HEIGHT));

    final JPanel southPanel = new JPanel(new BorderLayout());
    southPanel.setBorder(new EmptyBorder(8, 5, 5, 5));

    final JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 5, 5));
    buttonPanel.add(okButton);
    buttonPanel.add(cancelButton);

    southPanel.add(buttonPanel, BorderLayout.EAST);

    panel.add(setterPanel, BorderLayout.NORTH);
    panel.add(southPanel, BorderLayout.SOUTH);

    add(panel, BorderLayout.CENTER);

    pack();
  }
Dialog to export the current view into a variety of formats.
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/dialogs/ExportViewDialog.java