Command cmdFilter = new Command("", FontImage.createMaterial(FontImage.MATERIAL_FILTER_LIST, UIManager.getInstance().getComponentStyle("Command"))) { public void actionPerformed(com.codename1.ui.events.ActionEvent ev) { onFilter(); } }; this.getToolbar().addCommandToRightBar(cmdFilter);
protected void onFilter() { dlgFilter.show(); MessageBox.OK("canceled:" + dlgFilter.Cancelled, "Result"); }
Button b = form.getToolbar().findCommandComponent(cmd);