@Override
	public void stateChanged(ChangeEvent e) {

		String message = model.getMessage();
		setStatusText(message);
		setOkEnabled(message.length() == 0);
		lengthField.setValue(Long.valueOf(model.getLength()));
		Address startAddr = model.getStartAddress();
		Address endAddr = model.getEndAddress();
		isChanging = true;
		if (dialogType == EXPAND_UP && startAddr != null) {
			startAddressInput.setAddress(startAddr);
		}
		else if (endAddr != null) {
			endAddressInput.setAddress(endAddr);
		}
		isChanging = false;

		if (!isVisible()) {
			setOkEnabled(false);
			tool.showDialog(this);// this blocks, so dispose model when dialog is dismissed.
			model.dispose();
		}
	}
@see javax.swing.event.ChangeListener#stateChanged(javax.swing.event.ChangeEvent)
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/memory/ExpandBlockDialog.java