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,971
  • 9
  • 68
  • 98
russellsayshi
  • 2,449
  • 5
  • 17
  • 21

1 Answers1

4

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

https://i.stack.imgur.com/h8MGo.png

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

tckmn
  • 57,719
  • 27
  • 114
  • 156