java - change title of menuItem -


i having problems changing title of menuitem once created.

i tried this:

menuitem nativeitem = new menuitem(nativetitle); nativeitem.addactionlistener(new actionlistener(){    public void actionperformed(actionevent e) {       if(menuitemenable.isselected()){          nativeitem.settitle("enable native hook"); //this not working       }else{          nativeitem.settitle("disable native hook"); //this not working       }    } }); menu.add(nativeitem); 

thx gla3dr

use this

setlabel("hello");


Comments

Popular posts from this blog

java - Checkbox item adds to spinner -

php - mySQL problems with this code? -

C# MVC AngularJS -