java - Which Swing layout manager should I use? -


i creating swing dialog window below:

enter image description here

the header , footer areas have fixed size. area 1 , 2's size not fixed. can have several lines of content , line number can increase at runtime.

and in future, may need add area 3.

how should use swing layout managers achieve ui?

add 1

the area 1 , 2 independent of each other.

in each of them, want place several panels vertically. each panel hold line of string. panel number can vary @ runtime.

use borderlayout main layout.

  1. add "header" north.
  2. add "footer" south.
  3. create panel , add center. set layout manager of panel appropriate layout manager. can't advise layout manager use panel since don't know how 2 components area related. add "area1" , "area2" panel.

the key answer don't need use single layout manager, can nest panels different layout managers.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -