Jump to content

Override default GridLayout CELL

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
thieflock

thieflock

    Newbie

  • Members
  • PipPip
  • 29 posts
Okay so I have a GUI that is divided into a (3,1) GridLayout. I have the (3,1) cells declared as there own panels now how can I change the height of the last one?

#2
Nathandelane

Nathandelane

    Newbie

  • Members
  • PipPip
  • 22 posts
So, it sounds to me like you have a grid that has three columns and one row, like:

***

and you want to make the third column a little longer, like:

*
***

Just as a for-instance - however in the GridLayout this is not possible, as a matter of fact in the GridLayout, all cells are always exactly the same size. I believe that you should look into GridBagLayout or BoxLayout (e.g. Box.createHorizontalBox, Box.createVerticalBox). These layouts might have more what you're looking for.

Nathan

#3
gszauer

gszauer

    Programmer

  • Members
  • PipPipPipPip
  • 113 posts
java.net: Custom Layouts

~Aristotle said:

It is the mark of an educated mind to entertain a tought without accepting it
If my post was helpful, please help me build some rep Posted Image