private JPanel buildMainPanel(DomainFile df, User user) {
		JPanel innerPanel = new JPanel();
		innerPanel.setLayout(new BorderLayout());
		innerPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
		innerPanel.getAccessibleContext().setAccessibleName("File Checkout");

		JPanel msgPanel = new JPanel(new BorderLayout());
		msgPanel.add(
			new GIconLabel(OptionDialog.getIconForMessageType(OptionDialog.WARNING_MESSAGE)),
			BorderLayout.WEST);
		msgPanel.getAccessibleContext().setAccessibleName("Message");

		MultiLineLabel msgText = new MultiLineLabel("File " + df.getName() +
			" is NOT CHECKED OUT.\n" + "If you want to make changes and save them\n" +
			"to THIS file, then you must first check out the file.\n" +
			"Do you want to Check Out this file?");
		msgText.setMaximumSize(msgText.getPreferredSize());
		msgPanel.add(msgText, BorderLayout.CENTER);

		innerPanel.add(msgPanel, BorderLayout.CENTER);

		exclusiveCheckout = true;
		if (user != null) {
			exclusiveCheckout = false;
			if (user.hasWritePermission()) {
				final JCheckBox exclusiveCB = new GCheckBox("Request exclusive check out");
				exclusiveCB.setSelected(false);
				exclusiveCB.addActionListener(e -> exclusiveCheckout = exclusiveCB.isSelected());
				JPanel cbPanel = new JPanel(new BorderLayout());
				cbPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
				exclusiveCB.getAccessibleContext()
						.setAccessibleDescription("Exclusize Checkout Box");
				cbPanel.add(exclusiveCB);
				cbPanel.getAccessibleContext().setAccessibleDescription("Checkboxes");
				innerPanel.add(cbPanel, BorderLayout.SOUTH);
			}
		}
		return innerPanel;
	}
Show the dialog; return an ID for the action that the user chose.
@return OK, or CANCEL
Ghidra/Features/Base/src/main/java/ghidra/app/util/dialog/CheckoutDialog.java