Resizing JTable according to the size of the Frame

Posted on 2007-10-03
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

Question by:sangameshrh
    LVL 86

    Accepted Solution

    Set BorderLayout on JDialog. Add table to JScrollPane, add scroll pane to dialog
    LVL 86

    Expert Comment

    LVL 92

    Expert Comment


    dialog.getContentPane().setLayout(new BorderLayout());

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
    How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from ( Go to that link and select download selenium in the right hand columnThat will then direct you to their downlo…
    Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now