protected JPanel buildMainPanel() {
		historyButton = new JButton("History>>");
		historyButton.addActionListener(e -> showHistoryPanel(!historyIsShowing));

		rootPanel.setPreferredSize(getPreferredSizeForHistoryState());

		mainPanel = new JPanel(new BorderLayout());
		mainPanel.add(buildDataTreePanel(), BorderLayout.CENTER);
		JPanel historyButtonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
		historyButtonPanel.add(historyButton);
		mainPanel.add(historyButtonPanel, BorderLayout.SOUTH);
		mainPanel.setMinimumSize(new Dimension(200, HEIGHT));

		splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
		splitPane.setLeftComponent(mainPanel);
		splitPane.setOneTouchExpandable(true);

		splitPane.setDividerSize(0);
		splitPane.setDividerLocation(1.0);
		splitPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));

		JPanel projectFilePanel = new JPanel(new BorderLayout());
		projectFilePanel.add(splitPane);

		openObjectsTable = null;
		tabbedPane = null;

		if (openDomainObjects == null || openDomainObjects.isEmpty()) {
			return projectFilePanel; // return Project File selection panel only
		}

		// Create tabbed pane with "Project Files" and "Open Program" tabs
		// NOTE: actual tab name reflects domainObjectClass name
		tabbedPane = new JTabbedPane();
		tabbedPane.setName("Tabs");
		tabbedPane.add("Project Files", projectFilePanel);
		tabbedPane.add("Open " + domainObjectClass.getSimpleName() + "s",
			buildOpenObjectsTable());

		tabbedPane.addChangeListener(e -> {
			int selectedTabIndex = tabbedPane.getModel().getSelectedIndex();
			if (selectedTabIndex == PROJECT_FILES_TAB) {
				// Project tree and History use
				String nameText = getNameText();
				setOkEnabled((nameText != null) && !nameText.isEmpty());
			}
			else { // OPEN_OBJECT_LIST_TAB
				setOkEnabled(getSelectedOpenDomainObject() != null);
			}
			updateOkTooltip();
		});

		JPanel tabbedPanel = new JPanel();
		tabbedPanel.setLayout(new BorderLayout());
		tabbedPanel.add(tabbedPane, BorderLayout.CENTER);

		tabbedPane.setSelectedIndex(PROJECT_FILES_TAB);
		return tabbedPanel;
	}
Return the selected version number from the history panel.
@return -1 if a version history was not selected
Ghidra/Features/Base/src/main/java/ghidra/framework/main/OpenVersionedFileDialog.java