MenuBar item

Hello,
is there any way to set static MenuBar item background color layout after click on it ? like item select.

@Override
public void menuSelected(MenuItem selectedItem) {

			selectedItem.setStyleName("select");
			
		}

I try this but doesn’t work

Resolved , the problem was in CSS style.

Yes, that’s the way it’s done. There’s also a
recent new example
about it. Just note that the style name “selected” is reserved for other use.