Resizing JTable according to the size of the Frame

I have JTable in JDialog (Its is the only component in that frame). When the JDialog is resized using mouse drag I want the JTable to be resized accordingly.
I am using JDK 1.6

Thanks
sangameshrhAsked:
Who is Participating?
 
CEHJCommented:
Set BorderLayout on JDialog. Add table to JScrollPane, add scroll pane to dialog
0
 
objectsCommented:
try:

dialog.getContentPane().setLayout(new BorderLayout());
dialog.getContentPane.add(table);
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.