Hi..
To remove all the items from popupmenu, we can use removeAll(). Instead, I need to remove only tablecolumns & "Keep parent row, if any children match" menu items from popup menu items. I have tried the following code to remove tablecolumns menu item. But it is not worked out.
fSearchField.setPopupMenuCustomizer(new LabeledTextField.PopupMenuCustomizer() {
public void customize(LabeledTextField field, JPopupMenu menu) {
for(int i=0; i <= fTableModel.getColumnCount(); i++){
menu.remove(2);
}
}
});
Kindly let me know to remove table column menu items & some specific default columns from popupmenu item.
The remove() contains, parameter as index or component. I want to know the index of the menu items, i want to remove. Else, component.