Scroll pane creation has a typical code which servers to be a container, for a table.
In this snippet, 2 lines would be doing the given:
JScrollPane scrollPane = new JScrollPane(table);
• Along with an argument, constructor JScrollPane would be invoked which will be referring to the table objects. A scroll pane would be created as a container for sake of table; automatically addition of the table