954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Clearing all rows in table

public void setTableModel(List<Users> users) {
	eraseTableRows();
	for (int i = 0; i < users.size(); i++) {
		Users u = users.get(i);
		tm.insertRow(i, new Object[] { stuff });
		}
		
	}

private void eraseTableRows() {
        for (int i = 0; i > tm.getRowCount(); i++) {
	         tm.removeRow(i);
	}

i've tried this and the setRowCount and none of these work

Thanks in advance

white feather
Light Poster
49 posts since Apr 2010
Reputation Points: 18
Solved Threads: 2
 

Turns out i never cleared the List...duh lol

white feather
Light Poster
49 posts since Apr 2010
Reputation Points: 18
Solved Threads: 2
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: