I have tried putting rows in a JTable and that is what I managed to do. My variable input stores text from a textfield. What I want is that if an input is repeated, the word appears in one column and in the other column the times that it has been repeated. "1" there must be the word count. I know that the "1" there is just always printing "1" in the row. I want that number to increase when the word is repeated.
model.insertRow(model.getRowCount(), new Object[]{"1",input});