Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

JTable not updating despite repacking and refreshing

I am creating a Swing UI for a uni project, and I want the JTable to update based on a button click.

Object[][] rows = DataStructureConversionUtils.arrayListTo2DArrayConverter(db.searchByPostcode(postcodeTxtField.getText()));
remove(resultTable);
add(createResultTable(rows),gridBagConstraints);
uiBuilder.refresh();

The refresh method calls pack and repaint on the JFrame. It isn't updating and I can't figure out why.

Comments