If you want your JTable need to appear in the full page i.e JTable will cover the full JFrame window then just add the below line in your code.
panel.setLayout(new BorderLayout());
Here panel is the JPanel where you will add your JTable
Also you can see “How to add data in JTable using TableModel“