Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TableRowFilterSupport only sorting not filtering? #46

Closed
bio6891 opened this issue Jun 24, 2016 · 3 comments
Closed

TableRowFilterSupport only sorting not filtering? #46

bio6891 opened this issue Jun 24, 2016 · 3 comments

Comments

@bio6891
Copy link

bio6891 commented Jun 24, 2016

Hello,

I have the following java code. I wanted to add column filters, so I've added the TableRowFilterSupport.forTable to my code.

However when clicking on a column header, I'm now able to sort the values in the column, but I don't see a possibility to filter. What is wrong?

private void updateTable() {

Object[] header = data.getHeaderForTable();
Object[][] content = data.getContentForTable();

jTable1 = new JTable(content, header);
TableRowFilterSupport.forTable(jTable1).apply();

jTable1.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
jTable1.setRowSelectionAllowed(true);
jTable1.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mouseClicked(java.awt.event.MouseEvent evt) {
        classifyMenu.setEnabled(true);
    }
});

jScrollPane2.setViewportView(jTable1);
repaint();

}

@DanhDue
Copy link

DanhDue commented Jan 10, 2018

I have the same problem.
Do you find the approach to solving it?

@eugener
Copy link
Owner

eugener commented Jan 10, 2018

Have you tried to right-click on the column header? :)

@DanhDue
Copy link

DanhDue commented Jan 11, 2018

Oh my god!
Many Thanks!
=)))))))

@eugener eugener closed this as completed Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants