private void initPanel() {
    final JPanel mainPanel = new JPanel(new BorderLayout());
    mainPanel.setBorder(new TitledBorder("Edit Text Condition"));

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

    inputField.addKeyListener(new InternalTextListener());
    inputField.setPreferredSize(new Dimension(inputField.getPreferredSize().width, 23));
    inputPanel.add(inputField, BorderLayout.NORTH);

    final JPanel checkboxesPanel = new JPanel(new GridLayout(2, 1));
    checkboxesPanel.setBorder(new EmptyBorder(5, 0, 0, 0));

    checkboxesPanel.add(caseSensitiveBox);
    checkboxesPanel.add(regExBox);

    inputPanel.add(checkboxesPanel, BorderLayout.CENTER);

    mainPanel.add(inputPanel, BorderLayout.NORTH);

    add(mainPanel, BorderLayout.CENTER);
  }
User interface for setting text-based conditions.
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/dialogs/criteriadialog/conditions/text/TextCriterionPanel.java