private void updateTextField() {

		if (useMouseBindingCheckBox.isSelected()) {
			textFieldPanel.remove(keyEntryPanel);
			textFieldPanel.add(mouseEntryField, BorderLayout.NORTH);
		}
		else {
			textFieldPanel.remove(mouseEntryField);
			textFieldPanel.add(keyEntryPanel, BorderLayout.NORTH);
		}

		validate();
		repaint();
	}
A panel that displays inputs for key strokes and mouse bindings.
Ghidra/Framework/Docking/src/main/java/docking/ActionBindingPanel.java