private JMenuItem createColumnMaskUnmaskAllMenuItem(boolean mask, String menuLabel) {

		HelpLocation helpLocation = new HelpLocation("Tables", "GhidraTableHeaders");

		final JMenuItem item = new JMenuItem(menuLabel);
		item.addActionListener(e -> {
			int rows = InstructionTable.this.getRowCount();
			for (int row = 0; row < rows; row++) {
				maskField(row, selectedColumn, mask);
			}
		});
		DockingWindowManager.getHelpService().registerHelp(item, helpLocation);
		return item;

	}
Generic method for creating a toolbar button with the given attributes.
The button is automatically added to the given toolbar instance.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/instructionsearch/ui/InstructionTable.java