1

I'm new to Java. I'm making a multiplayer Tic-Tac-Toe game as a test. For the main menu, I'd love a layout that looked like this: Ideal layout

The problem is, I have no idea how to make that. I have a JFrame with all the content ready (the buttons and such), but everything appears completely out of location. I've tried BoxLayout, GridLayout, FlowLayout, and a few others, with no results. I've had a headache over this all day, and any help would be appreciated.

So, if you have any recommended layouts, or any tips to get this working, that'd be great :)

StanislavL
  • 56,113
  • 9
  • 64
  • 93
russellsayshi
  • 2,331
  • 5
  • 16
  • 20

1 Answers1

4

I would use a nested layout that looked something like this:

http://i.imgur.com/agGqAcW.png

GridBagLayout is useful for a more flexible layout, and BoxLayout for lining up a bunch of stuff.

tckmn
  • 55,458
  • 23
  • 108
  • 154