private void adjustPreferredSize() {
		int width = titleLabel.getPreferredSize().width + 5;
		int height = titleLabel.getPreferredSize().height + 5;
		if (isShowingProgress) {
			height += 5;
			height += progressBar.getPreferredSize().height;
			width = Math.max(width, progressBar.getPreferredSize().width);
		}
		if (isShowingMessage) {
			height += 5;
			height += progressMessagePanel.getPreferredSize().height;
			width = Math.max(width, progressMessagePanel.getPreferredSize().width);
		}
		setPreferredSize(new Dimension(width, height));

	}
Determines and sets the preferred size of this panel.
Ghidra/Features/Base/src/main/java/ghidra/app/merge/PhaseProgressPanel.java