Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1132
  • Last Modified:

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
0
sangameshrh
Asked:
sangameshrh
  • 2
1 Solution
 
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now