MenuBar item

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

public void menuSelected(MenuItem selectedItem) {


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.