i'm new layout managers flow
, borders
, ...
use setbounds()
set position of components.
i read on article using setbounds
not practice , it's better use layout.
which best , used layouts?
how position button using layout managers; instead of doing setbounds(10,10,100,30)
?
look here: http://download.oracle.com/javase/tutorial/uiswing/layout/using.html
basically should forget coordinates. @ dialogs @ higher level of design. questions should ask yourself.
1) there "main" area smaller surrounding areas in design. if use borderlayout.
2) there equal grid areas in design, if use gridlayout.
3) if need top-down, or left-right layout, consider boxlayout
4) if want show complex form, use formlayout jgoodies.
but have @ things high level. there may subsections in 1 top level section of dialog. if case, need put jpanel in section, , use sub layout in jpanel. use above questions on again panel.
Comments
Post a Comment