jscrollpane - Scroll Pane is visible but doesn't work when dynamically updating rows in java table -
i have java table update rows dynamically. here example created. mimics actual program line line creating table , adding scrollpane. actual program huge , sorry can't share it. import java.awt.*; import java.awt.event.*; import java.util.concurrent.executors; import java.util.concurrent.scheduledexecutorservice; import java.util.concurrent.timeunit; import javax.swing.*; import javax.swing.table.defaulttablemodel; class simpletableexample extends jframe { private jpanel toppanel; private jtable table; private jscrollpane scrollpane; private defaulttablemodel model = null; private jpanel pmainmenu = null; public simpletableexample() { pmainmenu = new jpanel(); borderlayout thislayout = new borderlayout(); pmainmenu.setlayout(thislayout); { jpanel pbuttons = new jpanel(); pmainmenu.add(pbuttons, borderlayout.north); gridbaglayout pbuttonslayout = new gridbaglayout(); pbuttonslayout.columnwidths = new int[]{7, 7, 7}; ...