Column Filter

Top  Previous  Next

 

TableAssistant provides a popup through which the columns of the table can be dynamically added/removed. The popup is shown upon right-clicking on the table header.

 

You can make the popup menu to show upon right-click mouse events on the header by calling TableAssistant's method:

 

public void setShowPopup(boolean showPopup);

 

You can also determine if the popup will be shown by calling:

 

public boolean getShowPopup();

 

Finally, an instance of the popup menu can be retrieved by calling:

 

public JPopupMenu getColumnPopup();

 

Example: Make the popup menu visible.

 

JPopupMenu popup = tableAssistant.getColumnPopup();

popup.setVisible(true);