I was going to use the program called Tiled, but decided not to since it was making everything into blocks and limited a bit of freedom.
My question is which layout manager would you use for something to look like Tiled. I really like the feel and when I make this tool I want it to act similarly when I move components around.
Here is what I have done and was thinking:
- Have a JFrame which contains a menu bar and a content pane. (Works perfect atm)
- The content pane is a BorderLayout. (Works perfect atm)
- Inside of the content pane is a tool bar just like the one below. (Works perfect atm)
- Inside the toolbar I will have buttons that will show as images, aka icon, and can be clicked on just like the red circle
- The content pane will contain two J Panels
- The first J panel will be like the black circle and will contain the map which I will paint on there
- The second J panel will contain components like layers, history, atlases, and images
- The first J Panel will be Center and the second J Panel will be East
Here are my problems:
- When I start up the GUI I get hardly any of the right JPanel and can’t seem to get it to go any wider unless I have actual content in it like a JList or something.
I am asking you all to guide me on what things you would do. While I have made GUI’s before I am not experienced enough to know how to really deal with this when it comes to choosing a layout manager and how exactly to use it in this particular situation. All I require is basic info on how you would do it and why, don’t need any code. THANKS!


I recommend using MigLayout. It is a very powerful and very well supported 3rd party layout manager. There have been (so far unsuccessful) petitions to include it with Java. MigLayout will allow you to do anything you want without having to make any compromises, and using much less code. I could go on about it, but if you just browse through their demos and sample code, you will see for yourself.