private Color getColorForComponent(JComponent comp) {
			if (comp instanceof AbstractButton) {
				return UIManager.getColor("Button.background");
			}
			else if (comp instanceof JComboBox) {
				return UIManager.getColor("ComboBox.background");
			}
			else if (comp instanceof JMenu) {
				return UIManager.getColor("Menu.background");
			}
			else if (comp instanceof JMenuBar) {
				return UIManager.getColor("MenuBar.background");
			}
			else if (comp instanceof JMenuItem) {
				return UIManager.getColor("MenuItem.background");
			}
			return UIManager.getColor("Panel.background");
		}
A factory to create JLayer instances to provide the L&amp;F and functionality of a 
disabled panel -- the component assumes a disabled color, and selection via mouse and
keyboard is prevented. As this is simply a layer in the UI stack, previous states of 
components is maintained and unmodified.
Ghidra/Framework/Docking/src/main/java/docking/DisabledComponentLayerFactory.java