• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with coding a layout

 
Adam Blais
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to code the following layout but am inexperienced with FlowLayout, GridLayout and BorderLayout. Can someone give me an example of code for the following layout?

 
Steven Bell
Ranch Hand
Posts: 1071
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tell the truth now, is this a homework assignment?

Well, off hand it looks like you could set the top level layout as BorderLayout. Add one panel to it's NORTH, CENTER, and SOUTH.
The 'NORTH' Panel could just use FlowLayout, and you would create the TextArea on the right with the constructor that defines the number of columns and rows.

The 'CENTER' Panel would just be a JScrollPane with a TextArea in it.

The 'SOUTH' Panel could be GridLayout with one row and five columns, might have to do some playing with the size of the buttons.

If this is not homework I think the GUI you have there is pretty ugly and you would be better off going with JGoodies forms.

That should be more than enough to get you started.
 
Adam Blais
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help that's exactly what I needed.

This is a homework assignment. I finished the entire program and just wanted to get the GUI layout the way I wanted. Thanks again.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!