KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is it possible to completely emulate the behavior of a GridLayout with the GridBagLayout manager? Basically, I have a 8x8 grid in which each cell should have the same width and height. The GridLayout automatically did this. But I want to add another row and column to the grid which size is not the same as the other ones. That row/column should take up all the remaining space that might be left over (because the available size couldn't be equally distributed into 8 cells). Is that even possible, or do I – again – have to use a different layout manager? edit Here is a simple graphic of what I want to achieve, simplified to just 4 cells: The colored cells are the ones I added to the actual grid (gray) which has cells with the same height and width x . So the grid's height and width is 4*x . I now want the additional cells to have the necessary width/height (minimumSize) plus the rest of the available width/height from the full size. If the whole panel's size is changed, the gray grid cells should again take up as much as space as possible.
Tags (comma-separated)
Save Edits
Cancel