swing - Java table in table with auto resize -


I want to wrench a table that can have smaller tables and resize. Enter image details here

My solution uses JScrollpane, which includes table and gridbaglayout The line which is the JPanel and this line contains the JPanel JLabels and the ETable (flowlayout).

How can I solve the problem size? When I change the window size, then automatically align the column with the window.

My code is.

Enter the image details here

Columns in the bigger table correctly There are no alliances with.

  1. I am there with a jam tree table or custom look and fail Outline appears (Renderer Nimbus is talking about L & F because the background is not used correctly for the Boolean value) JComponents (from top) put JPanel on top and use GridBagLayout there

  2. The JScrollPane J (X) treeTable or put put outline is inserted into the center area Is

  3. Please used type of Trytebl ??? (For the selection of the favorite stitches of the column)

    Edit

    In this situation, replace the table with a black box It is not relevant is.

    JFrame has implemented the border layout in the API, then

    • all You can use GridBagLayout where JComponent s has been placed in the JFrame header from JPanel , Enter this jpnil at northern area JFrame.add (JPanel, BorderLayout.NORHT)

    • insert black box in the center area, for example JFrame.add (Black Box, Border Layout.CENTER) < / Ul>

Comments