0

I want to edit the height of a single row in a JFrame with a GridLayout. Is there any way to do this or must the height of every row be constant?

Fraser Price
  • 899
  • 6
  • 15
  • 36
  • 1
    `GridLayout` makes every component the same size, so all the rows will be the same height too. You have to use a different layout manager (`GridBagLayout` maybe, if you prefer to stay within the standard library). – kiheru Mar 21 '14 at 17:17
  • You can nest panels, as shown [here](http://stackoverflow.com/a/22491318/230513). – trashgod Mar 21 '14 at 17:39

1 Answers1

0

Is there any way to do this..

Not with a single GridLayout.

..or must the height of every row be constant?

Yes, every row in a single GridLayout is the same height, and every cell is the same width.

Provide ASCII art (or an image with a simple drawing) of the GUI as it should appear in smallest size and (if resizable) with extra width/height.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433