user1162715
user1162715

Reputation:

How to integrate different layout managers to fit this?

I assume I have to use a GridLayout(1,2), and assign the first side a null, and the second a JTextArea.

For the left side though, I'm not exactly sure what to do. Maybe possibly a BoxLayout?

enter image description here

Upvotes: 3

Views: 79

Answers (2)

Kevin Day
Kevin Day

Reputation: 16363

I would just use a single MigLayout and be done with it. There's a little bit of learning curve (though really, not much) and you will be able to do this sort of thing very easily, and without nesting layouts.

Upvotes: 3

Andrew Thompson
Andrew Thompson

Reputation: 168815

I would tend to put a BorderLayout in the LHS.

  • Put the label in the WEST
  • Put the text area (that should really be a text field) in the CENTER or EAST
  • In the SOUTH, put a panel with a centered FlowLayout for the button.

It really depends on how you want the extra space assigned in the event that the user expands the GUI. Is the GUI resizable?

Upvotes: 3

Related Questions