We help IT Professionals succeed at work.

Resizing JTable according to the size of the Frame

sangameshrh
sangameshrh asked
on
1,159 Views
Last Modified: 2013-12-22
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
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2016
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Top Expert 2016

Commented:
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
try:

dialog.getContentPane().setLayout(new BorderLayout());
dialog.getContentPane.add(table);
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.