private JPanel create() {
		fieldName = new JTextField();

		JPanel mainPanel = new JPanel(new BorderLayout());

		nameBorder = BorderFactory.createTitledBorder("Enter Field Name");
		mainPanel.setBorder(nameBorder);
		fieldName.getAccessibleContext().setAccessibleName("Name");
		mainPanel.add(fieldName, BorderLayout.CENTER);

		mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		mainPanel.getAccessibleContext().setAccessibleName("Edit Field Name");
		return mainPanel;
	}
Define the Main panel for the dialog here.
Ghidra/Features/Base/src/main/java/ghidra/app/util/EditFieldNameDialog.java