Question about resizing / packing JTable in JDialog.
I programmed a JDialog with the BorderLayout.
In the CENTER, I placed a JTable, and in the SOUTH, I placed a panel with buttons. When the JDialog is being made, the JTable is being filled by files of a specific directory.
So, when the JDialog is showing up, you can see a list of files, but the problem is that the JDialog is not repacking / resizing itself to the size of the number of rows in the JTable and the width of the JTable. The JDialog is too big.
Now, I would like to know I can see repack / resize this JDialog to the JTable with contents.
What is the Java source code for doing that?
Thank you for your answer in advance.