I have a JTable with autoResizeMode set to AUTO_RESIZE_LAST_COLUMN. I added it to the panel by creating a JScrollPane with a JTable as a child widget, and then adding a JScrollPane to the panel.
I would like to set the size of the JScrollPane viewport to the size of the parent JPanel and dynamically resize the last JTable column.
source share