private void buildMainPanel(String message) {

		JPanel introPanel = new JPanel(new BorderLayout(10, 10));
		introPanel.add(
			new GIconLabel(UIManager.getIcon("OptionPane.errorIcon"), SwingConstants.RIGHT),
			BorderLayout.WEST);

		JLabel messageLabel = createMessageLabel(message);

		introPanel.add(messageLabel, BorderLayout.CENTER);

		mainPanel = new JPanel(new BorderLayout(10, 20));
		mainPanel.add(introPanel, BorderLayout.NORTH);

		sendButton = new JButton(SEND);
		sendButton.addActionListener(e -> sendDetails());

		detailsButton = new JButton(isShowingDetails ? CLOSE : DETAIL);
		detailsButton.addActionListener(e -> {
			String label = detailsButton.getText();
			showDetails(label.equals(DETAIL));
		});

		detailsPane = new ErrorDetailsSplitPane();

		JPanel sideButtonPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 5, 5));
		sideButtonPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
		if (errorReporter != null) {
			sideButtonPanel.add(sendButton);
		}
		sideButtonPanel.add(detailsButton);

		introPanel.add(sideButtonPanel, BorderLayout.EAST);
		mainPanel.add(detailsPane, BorderLayout.CENTER);

		addWorkPanel(mainPanel);

		addOKButton();
		setDefaultButton(okButton);

		// show the details panel if it was showing previously
		detailsPane.setVisible(isShowingDetails);
		detailsPane.selectFirstError();
	}
tracks 'details panel' open state across invocations
Ghidra/Framework/Docking/src/main/java/docking/ErrLogDialog.java