protected JPanel buildMainPanel() {

		titleLabel = new GDLabel("Possible Matches");
		titleLabel.getAccessibleContext().setAccessibleName("Title");
		titleLabel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));

		//long value = scalar.getSignedValue();
		applyToCurrent = new GRadioButton("Current location", true);
		applyToCurrent.setName("applyToCurrent");
		applyToCurrent.getAccessibleContext().setAccessibleName("Apply to Location");
		applyToCurrent.setToolTipText("Apply to current scalar operand only");

		applyToSelection = new GRadioButton("Current selection", false);
		applyToSelection.setName("applyToSelection");
		applyToSelection.getAccessibleContext().setAccessibleName("Apply to Selection");
		applyToSelection.setToolTipText(
			"Apply to all matching, defined scalar code " + "units in current selection.");

		applyToAll = new GRadioButton("Entire program", false);
		applyToAll.setName("applyToAll");
		applyToAll.getAccessibleContext().setAccessibleName("Apply to All");
		applyToAll.setToolTipText(
			"Apply to all matching, defined scalar code units " + "in entire program.");

		ButtonGroup group = new ButtonGroup();
		group.add(applyToCurrent);
		group.add(applyToSelection);
		group.add(applyToAll);

		overwriteExistingEquates = new GCheckBox("Overwrite existing equates", false);
		overwriteExistingEquates.setName("Overwrite");
		overwriteExistingEquates.getAccessibleContext().setAccessibleName("Overwrite");
		overwriteExistingEquates.setEnabled(false);
		overwriteExistingEquates.setToolTipText("If checked, apply equates to all unmarked " +
			"scalars and overwrite any existing equates of the same value in the " +
			"current selection or entire program depending on which option is selected. " +
			"If not checked, only apply equates to unmarked scalars.");

		applyToCurrent.addActionListener(evt -> {
			overwriteExistingEquates.setEnabled(!applyToCurrent.isSelected());
			if (applyToCurrent.isSelected()) {
				overwriteExistingEquates.setSelected(false);
			}
		});

		applyToSelection.addActionListener(
			evt -> overwriteExistingEquates.setEnabled(applyToSelection.isSelected()));

		applyToAll.addActionListener(
			evt -> overwriteExistingEquates.setEnabled(applyToAll.isSelected()));

		List<EquateRowObject> equateNames = getCurrentAndPotentialEquateNames();
		model = new SetEquateTableModel(tool, equateNames, program);
		suggestedEquatesTable = new GhidraTable(model);
		suggestedEquatesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

		// allows users to press enter in the table to accept the current selection
		KeyStroke enter = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
		AbstractAction action = new AbstractAction() {
			@Override
			public void actionPerformed(ActionEvent e) {
				okCallback();
			}
		};
		KeyBindingUtils.registerAction(suggestedEquatesTable, enter, action,
			JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);

		// allows users to double-click a row to accept the item
		suggestedEquatesTable.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseReleased(MouseEvent e) {
				int index = suggestedEquatesTable.columnAtPoint(e.getPoint());
				if (index >= 0) {
					if (e.getClickCount() == 2) {
						okCallback();
					}
				}
			}
		});

		JPanel tablePanel = new JPanel(new BorderLayout());
		tablePanel.getAccessibleContext().setAccessibleName("Table Panel");
		JScrollPane scrollPane = new JScrollPane(suggestedEquatesTable);
		scrollPane.getAccessibleContext().setAccessibleName("Suggested Equates");
		tablePanel.add(scrollPane);
		tablePanel.setBorder(BorderFactory.createEmptyBorder(2, 5, 5, 5));

		filterPanel =
			new GhidraTableFilterPanel<>(suggestedEquatesTable, model, " Equate String: ");
		filterPanel.getAccessibleContext().setAccessibleName("Suggested Equates");
		model.addTableModelListener(evt -> updateFilter());

		GhidraTableCellRenderer renderer = getRenderer();
		TableColumnModel tcm = suggestedEquatesTable.getColumnModel();
		for (int i = 0; i < model.getColumnCount(); i++) {
			tcm.getColumn(i).setCellRenderer(renderer);
		}

		filterPanel.addFilterChagnedListener(filterListener);
		filterPanel.addEnterListener(enterListener);

		JPanel northPanel = new JPanel(new VerticalLayout(2));
		northPanel.getAccessibleContext().setAccessibleName("Equate Field");
		String labelText = "Scalar Value:  " + scalar.toString(16, false, true, "0x", "") + " (" +
			scalar.toString(10, false, true, "", "") + ")";
		JLabel label = new GLabel(labelText);
		label.setName("EquateField");
		label.getAccessibleContext().setAccessibleName("Equate Field");
		label.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
		northPanel.add(label);
		northPanel.add(titleLabel);
		northPanel.add(filterPanel);
		northPanel.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 5));

		JPanel scopePanel = new JPanel(new HorizontalLayout(2));
		scopePanel.getAccessibleContext().setAccessibleName("Application Scope");
		scopePanel.setBorder(BorderFactory.createEmptyBorder(10, 5, 0, 5));

		scopePanel.add(new GLabel("Apply To: "));
		scopePanel.add(applyToCurrent);
		scopePanel.add(applyToSelection);
		scopePanel.add(applyToAll);

		JPanel optionsPanel = new JPanel(new HorizontalLayout(2));
		optionsPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
		optionsPanel.getAccessibleContext().setAccessibleName("Options");
		optionsPanel.add(new GLabel("Options: "));
		optionsPanel.add(overwriteExistingEquates);

		JPanel southPanel = new JPanel(new VerticalLayout(0));
		southPanel.getAccessibleContext().setAccessibleName("Application Scope and Options");
		southPanel.add(scopePanel);
		southPanel.add(optionsPanel);

		JPanel mainPanel = new JPanel() {
			@Override
			public Dimension getPreferredSize() {
				return new Dimension(700, 400);
			}
		};
		mainPanel.setLayout(new BorderLayout());
		mainPanel.setSize(mainPanel.getPreferredSize());
		mainPanel.add(northPanel, BorderLayout.NORTH);
		mainPanel.add(tablePanel, BorderLayout.CENTER);
		mainPanel.add(southPanel, BorderLayout.SOUTH);
		mainPanel.getAccessibleContext().setAccessibleName("Set Equate");
		return mainPanel;
	}
Constructor

@param tool the EquatePlugin that launched this dialog(used to validate input)
@param program the program the equate is located in.
@param value the equate value to set.
Ghidra/Features/Base/src/main/java/ghidra/app/util/bean/SetEquateDialog.java