Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which layout manager to learn to use

 
john merritt
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am teaching myself java from books and the internet. I found Mig Layout while searching for info on layout managers. Is this the only layout manager I need to learn to use or does it have limitation I am unaware of? Should I learn to use all the available layout managers or will Mig layout cover all eventualities I will ever need?
John Merritt
 
Kevin Workman
Ranch Hand
Posts: 151
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
john merritt wrote:I am teaching myself java from books and the internet. I found Mig Layout while searching for info on layout managers. Is this the only layout manager I need to learn to use or does it have limitation I am unaware of? Should I learn to use all the available layout managers or will Mig layout cover all eventualities I will ever need?
John Merritt


Best to learn them all- especially the standard ones. I would learn those before delving into Mig Layout. Most non-trivial GUIs will use a combination of nested layouts, and it's important to learn how they all fit together.

Check out A Visual Guide to Layout Managers, which I found as the first result for "java layouts".
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd avoid GridBagLayout. See the SwingFaq for alternatives that are a bit less powerful, but much easier to use: GridLayout2 and SGLayout.

Nested JPanels having BoxLayouts is something I find myself using a lot.
 
Matthew Brown
Bartender
Posts: 4567
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BorderLayout is the one I find myself using the most. It's amazing what you can do with a combination of BorderLayouts and GridLayouts.

 
john merritt
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank for the links
John
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic