W
Wes Harrison
I am getting a syntax error in my Java code that I cannot understand and
hope you can help me. It's with Java 6.0 and TableRowSorter. The line of
code is:
table.setRowSorter(new TableRowSorter(tableModel));
where table is a JTable and tableModel is an implementation of an
AbstractTableModel. The errors I get are:
MyTable.java:204: warning: [unchecked] unchecked call to TableRowSorter(M)
as a member of the raw type javax.swing.table.TableRowSorter
table.setRowSorter(new TableRowSorter(tableModel));
^
MyTable.java:204: warning: [unchecked] unchecked conversion
found : javax.swing.table.TableRowSorter
required: javax.swing.RowSorter<? extends javax.swing.table.TableModel>
table.setRowSorter(new TableRowSorter(tableModel));
What do they mean exactly and how do I fix the problem?
Thanks,
Wes
hope you can help me. It's with Java 6.0 and TableRowSorter. The line of
code is:
table.setRowSorter(new TableRowSorter(tableModel));
where table is a JTable and tableModel is an implementation of an
AbstractTableModel. The errors I get are:
MyTable.java:204: warning: [unchecked] unchecked call to TableRowSorter(M)
as a member of the raw type javax.swing.table.TableRowSorter
table.setRowSorter(new TableRowSorter(tableModel));
^
MyTable.java:204: warning: [unchecked] unchecked conversion
found : javax.swing.table.TableRowSorter
required: javax.swing.RowSorter<? extends javax.swing.table.TableModel>
table.setRowSorter(new TableRowSorter(tableModel));
What do they mean exactly and how do I fix the problem?
Thanks,
Wes