protected void setupSize() {
		GridBagConstraints gridBagConstraints = new GridBagConstraints();

		JLabel sizeLabel = new GDLabel("Size:");
		sizeLabel.setToolTipText("The current size in bytes.");
		gridBagConstraints.anchor = GridBagConstraints.LINE_END;
		gridBagConstraints.fill = GridBagConstraints.NONE;
		gridBagConstraints.gridx = 0;
		gridBagConstraints.gridy = 3;
		infoPanel.add(sizeLabel, gridBagConstraints);

		sizeTextField = new GFormattedTextField(new DefaultFormatterFactory(), "");
		sizeTextField.setName("Total Length");
		sizeTextField.setToolTipText("The current size in bytes.");
		setSizeEditable(false);

		gridBagConstraints.ipadx = 60;
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
		gridBagConstraints.insets = VERTICAL_INSETS;
		gridBagConstraints.gridx = 1;
		gridBagConstraints.gridy = 3;
		infoPanel.add(sizeTextField, gridBagConstraints);

		provider.registerHelp(sizeTextField, "Size");

		sizeTextField.setInputVerifier(new InputVerifier() {
			@Override
			public boolean verify(JComponent input) {
				return decodeUnsignedIntEntry(sizeTextField, "structure size", true) >= 0;
			}
		});

		sizeTextField.addKeyListener(new KeyAdapter() {
			@Override
			public void keyPressed(KeyEvent e) {
				if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
					e.consume();
					// revert to model state when escape is hit
					setCompositeSize(model.getLength());
				}
			}
		});

		sizeTextField.addTextEntryStatusListener(c -> provider.contextChanged());

		sizeTextField.addActionListener(e -> updatedStructureSize());

		sizeTextField.addFocusListener(new FocusAdapter() {
			@Override
			public void focusLost(FocusEvent e) {
				if (sizeTextField.isEditable()) {
					updatedStructureSize();
				}
			}
		});
	}
Sets the currently displayed structure packing value (maximum component alignment)
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/compositeeditor/CompEditorPanel.java