-1

There are many layout managers in swing, so when we have to choose those layout managers.Iam beginer in swing programming. Please provide me detailed explanation or any links is also helpful.

developer
  • 9,116
  • 29
  • 91
  • 150

4 Answers4

4

Depends on your requirement,learn some layout managers and decide.

Balaswamy Vaddeman
  • 8,360
  • 3
  • 30
  • 40
4

Simple answer: it's not easy job to decide what LayoutManager would be correct for your too broad question.

  • you can use one of the standard LayoutManagers

  • you can combine standard LayoutManagers, e.g. each of JPanel can have the same or different LayoutManager, common as Nested Layout

  • you can use newer or custom LayoutManagers, e.g. MigLayout

  • not easy job and required very good knowledge how the LayoutManager works

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
mKorbel
  • 109,525
  • 20
  • 134
  • 319
3

You can find a good explanation here: Layout Managers .

Wladimir Palant
  • 56,865
  • 12
  • 98
  • 126
Nikolay Antipov
  • 920
  • 2
  • 8
  • 17
2

It depends upon your requirement. Once you visualize how the each layout manager alter the position/arrangement of components. You can choose the layout that meets your requirement.

gtiwari333
  • 24,554
  • 15
  • 75
  • 102