• Post Reply Bookmark Topic Watch Topic
  • New Topic

Layout  RSS feed

 
Terry Stehle
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im trying to lay out my game so that the board is on the left hand side of the JFrame and the JTextField is in the upper right, and the JTextArea is below that. I have tried the GridBagLayout but can seem to get it to work. This is kinda what Im looking for
.................
. .TextField.
.Board...........
. .TextArea .
.................
The board is approx 560 x 560 in size, and the text field and area is for the chat area. I would appricate any help on how I can accomplish this. Thanks Terry
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BorderLayout might work using JPanels to control position of the text fields. Or you could use a verticle BoxLayout.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The drawing of your layout doesn't look exactly right... I think that some of the spaces you inserted for spacing were eaten...

Anyway... I think this was the layout you wanted... if not, post back what needs to be fixed...



-Nate
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!